diff options
| -rw-r--r-- | .vimrc | 30 |
1 files changed, 27 insertions, 3 deletions
@@ -19,11 +19,12 @@ Plug 'neoclide/coc.nvim', {'branch': 'release'} " IntelliSense practically Plug 'itchyny/lightline.vim' " Statusline for Vim Plug 'tpope/vim-fugitive' " git integration Plug 'mbbill/undotree' " Easily interact with undo history -" Plug 'OmniSharp/omnisharp-vim' " C# tools (autocompletion, ...) +Plug 'OmniSharp/omnisharp-vim' " C# tools (autocompletion, ...) Plug 'wakatime/vim-wakatime' " Time tracking via wakaime.com Plug 'dense-analysis/ale' " Syntax checker via LSP Plug 'ryanoasis/vim-devicons' " Icons on stuff like NERDTree Plug 'honza/vim-snippets' " Ready snippets for some langauges +Plug 'pseewald/vim-anyfold' " Better folding """""""""""""""""""""""""""""""" @@ -91,10 +92,33 @@ let g:syntastic_check_on_open=1 let g:syntastic_check_on_wq=0 """"""""""""""""""""""""""""""" +" Vim-anyfold settings +""""""""""""""""""""""""""""""" + +filetype plugin indent on +syntax on +autocmd Filetype * AnyFoldActivate " activate for all filetypes +set foldlevel=99 " Open all folds by default + +""""""""""""""""""""""""""""""" " Vim settings """"""""""""""""""""""""""""""" +autocmd InsertEnter,InsertLeave * set cul! " Highlight current line, when in insert mode set backspace=indent,eol,start " Better backspace functionality +set scrolloff=0 " Don't keep any screen lines above or below the cursor + +" Thin cursor in insert mode in Gnome-Terminal (version >=3.16 ; also works with Terminator) +if has("autocmd") + au VimEnter,InsertLeave * silent execute '!echo -ne "\e[1 q"' | redraw! + au InsertEnter,InsertChange * + \ if v:insertmode == 'i' | + \ silent execute '!echo -ne "\e[5 q"' | redraw! | + \ elseif v:insertmode == 'r' | + \ silent execute '!echo -ne "\e[3 q"' | redraw! | + \ endif + au VimLeave * silent execute '!echo -ne "\e[ q"' | redraw! +endif " Ctrl+c, Ctrl+v, Ctrl+z, Ctrl+a and Ctrl+s bindings " Partly taken from: https://gist.github.com/jshih/3423345 @@ -120,7 +144,6 @@ nnoremap <C-k> :tabn<CR> nnoremap <C-j> :tabp<CR> set number " Show line numbers to the left -set cursorline " Highlight the current line nnoremap = :tab ter ++close lazygit<CR> @@ -135,7 +158,7 @@ set mouse=a " Mouse support set tabstop=4 " Show tabs as 4 wide set shiftwidth=4 " Indent with 4 spaces -set expandtab " Convert tabs to spaces +" set expandtab " Convert tabs to spaces autocmd Filetype css setlocal tabstop=2 " Show CSS tabs as 2 spaces " When you press F6 it will toggle a "spell check mode", @@ -288,6 +311,7 @@ autocmd Filetype cs nmap <silent> <buffer> gi : OmniSharpFindImplementations<C autocmd Filetype cd nmap <silent> <buffer> gr : OmniSharpFindUsages<CR> autocmd FileType cs nmap <silent> <buffer> <F2> : OmniSharpRename<CR> autocmd FileType cs nmap <silent> <buffer> ff : OmniSharpCodeFormat<CR> +autocmd FileType cs nmap <silent> <buffer> fu : OmniSharpFixUsings<CR> """"""""""""""""""""""""""""""" " COC settings |
