diff --git a/after/indent/c.vim b/after/indent/c.vim new file mode 100644 index 0000000..ee7836d --- /dev/null +++ b/after/indent/c.vim @@ -0,0 +1,3 @@ +setlocal shiftwidth=4 +setlocal tabstop=4 +setlocal noexpandtab diff --git a/after/indent/mail.vim b/after/indent/mail.vim new file mode 100644 index 0000000..898bd04 --- /dev/null +++ b/after/indent/mail.vim @@ -0,0 +1,3 @@ +setlocal shiftwidth=2 +setlocal tabstop=2 +setlocal expandtab diff --git a/after/indent/markdown.vim b/after/indent/markdown.vim new file mode 100644 index 0000000..898bd04 --- /dev/null +++ b/after/indent/markdown.vim @@ -0,0 +1,3 @@ +setlocal shiftwidth=2 +setlocal tabstop=2 +setlocal expandtab diff --git a/after/indent/text.vim b/after/indent/text.vim new file mode 100644 index 0000000..898bd04 --- /dev/null +++ b/after/indent/text.vim @@ -0,0 +1,3 @@ +setlocal shiftwidth=2 +setlocal tabstop=2 +setlocal expandtab diff --git a/init.vim b/init.vim index de496df..3ff78d3 100644 --- a/init.vim +++ b/init.vim @@ -2,6 +2,7 @@ set nocompatible filetype off call plug#begin("~/.config/nvim/plugged") Plug 'tpope/vim-fugitive' +Plug 'vim-scripts/DoxygenToolkit.vim' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'scrooloose/nerdcommenter' @@ -15,6 +16,7 @@ Plug 'ciaranm/detectindent' Plug 'jiangmiao/auto-pairs' Plug 'antoyo/vim-licenses' Plug 'altercation/vim-colors-solarized' +"Plug 'ervandew/supertab' Plug 'neoclide/coc.nvim', {'branch': 'release'} call plug#end() filetype plugin indent on @@ -23,8 +25,8 @@ filetype plugin on """ General " indentation -set tabstop=2 " tabs only count for 4 spaces -set shiftwidth=2 " when indenting use 4 spaces +set tabstop=4 " tabs only count for 4 spaces +set shiftwidth=4 " when indenting use 4 spaces set noexpandtab " use tab characters set autoindent @@ -40,18 +42,43 @@ set nolist " disable line break on wrap " folding set foldmethod=syntax -set foldlevel=0 -set foldnestmax=1 +"set foldlevel=0 +"set foldnestmax=1 + +set clipboard+=unnamedplus " CoC settings -"inoremap - "\ pumvisible() ? "\" : - "\ check_back_space() ? "\" : - "\ coc#refresh() -"inoremap pumvisible() ? "\" : "\" -inoremap pumvisible() ? "\" : "\" -inoremap pumvisible() ? "\" : "\" +inoremap + \ coc#pum#visible() ? coc#pum#next(1) : + \ CheckBackspace() ? "\" : + \ coc#refresh() +inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" +"inoremap pumvisible() ? "\" : "\" +"inoremap pumvisible() ? "\" : "\" nmap :CocAction +let g:coc_disable_startup_warning = 1 + +inoremap coc#pum#visible() ? coc#pum#confirm() + \: "\u\\=coc#on_enter()\" + +function! CheckBackspace() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + +func! s:my_colors_setup() abort + " this is an example + hi CocFloating cterm=reverse ctermfg=251 + hi CocMenuSel cterm=reverse ctermfg=255 +endfunc + +augroup colorscheme_coc_setup | au! + au ColorScheme * call s:my_colors_setup() +augroup END + +" Use `[g` and `]g` to navigate diagnostics +nmap [g (coc-diagnostic-prev) +nmap ]g (coc-diagnostic-next) " syntax highlighting syntax on @@ -59,10 +86,15 @@ set background=dark colorscheme solarized """ Project-Specific Settings -" Brigham projects -augroup AgTech - au BufRead,BufEnter /home/nicolas/dev/C++/AgTech/* set expandtab tabstop=2 shiftwidth=2 -augroup END + +set cino+=(0 +set cino+=:0 +set cino+=l1 +set cino+=g0 +set cino+=N-s +set cino+=E-s +set cino+=p2s +set cino+=t0 """ key remapping " cursor navigation