summaryrefslogtreecommitdiff
path: root/.config/nvim/general/settings.vim
diff options
context:
space:
mode:
authorVito Graffagnino <vito@graffagnino.xyz>2020-09-09 14:53:26 +0100
committerVito Graffagnino <vito@graffagnino.xyz>2020-09-09 14:53:26 +0100
commit0d16d52492938dd92591b1278a73d50ef388c633 (patch)
tree2f342456a71b8c52dab89cb0311d033c24e54896 /.config/nvim/general/settings.vim
parent3b0142cedcde39e4c2097ecd916a870a3ced5ec6 (diff)
update/modularised nvim config files
Diffstat (limited to '.config/nvim/general/settings.vim')
-rw-r--r--.config/nvim/general/settings.vim45
1 files changed, 45 insertions, 0 deletions
diff --git a/.config/nvim/general/settings.vim b/.config/nvim/general/settings.vim
new file mode 100644
index 0000000..f144a4c
--- /dev/null
+++ b/.config/nvim/general/settings.vim
@@ -0,0 +1,45 @@
+set iskeyword+=- " treat dash separated words as a word text object"
+set formatoptions-=cro " Stop newline continution of comments
+
+syntax enable " Enables syntax highlighing
+set hidden " Required to keep multiple buffers open multiple buffers
+set nowrap " Display long lines as just one line
+set encoding=utf-8 " The encoding displayed
+set pumheight=10 " Makes popup menu smaller
+set fileencoding=utf-8 " The encoding written to file
+set ruler " Show the cursor position all the time
+set cmdheight=2 " More space for displaying messages
+set splitbelow " Horizontal splits will automatically be below
+set splitright " Vertical splits will automatically be to the right
+set t_Co=256 " Support 256 colors
+set conceallevel=0 " So that I can see `` in markdown files
+set tabstop=2 " Insert 2 spaces for a tab
+set shiftwidth=2 " Change the number of space characters inserted for indentation
+set smarttab " Makes tabbing smarter will realize you have 2 vs 4
+set expandtab " Converts tabs to spaces
+set smartindent " Makes indenting smart
+set autoindent " Good auto indent
+set laststatus=2 " Always display the status line
+set number relativenumber " Line numbers
+set cursorline " Enable highlighting of the current line
+set background=dark " tell vim what the background color looks like
+set noshowmode " We don't need to see things like -- INSERT -- anymore
+set nobackup " This is recommended by coc
+set nowritebackup " This is recommended by coc
+set shortmess+=c " Don't pass messages to |ins-completion-menu|.
+set signcolumn=yes " Always show the signcolumn, otherwise it would shift the text each time
+set updatetime=300 " Faster completion
+set timeoutlen=100 " By default timeoutlen is 1000 ms
+set clipboard=unnamedplus " Copy paste between vim and everything else
+set incsearch
+
+colorscheme gruvbox
+
+" au! BufWritePost $MYVIMRC source % " auto source when writing to init.vm alternatively you can run :source $MYVIMRC
+autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
+
+
+"If you forget to sudo before calling vim use the following to be
+"able to write the file.
+cnoremap w!! %!sudo tee > /dev/null %
+