summaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2020-12-15 14:30:19 +0200
committerSyndamia <kamen.d.mladenov@protonmail.com>2020-12-15 14:30:19 +0200
commit11a249233f95e9589e8d2e2a6f8973a2f290f279 (patch)
tree179d2b1e50e158cc49d4aaad2f5cab6b2f80b4ae /.vimrc
parent83e94d34c2a60afbfd764a9e90d2fd41dd2001fa (diff)
downloaddotfiles-11a249233f95e9589e8d2e2a6f8973a2f290f279.tar
dotfiles-11a249233f95e9589e8d2e2a6f8973a2f290f279.tar.gz
dotfiles-11a249233f95e9589e8d2e2a6f8973a2f290f279.zip
Added improved folding, cursor changes shape in insert mode, enabled and improved C# programming tools
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc30
1 files changed, 27 insertions, 3 deletions
diff --git a/.vimrc b/.vimrc
index dd225a9..8714c6d 100644
--- a/.vimrc
+++ b/.vimrc
@@ -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