feat: vimrc updates
This commit is contained in:
parent
684814a570
commit
ab973281fd
67
.vim/vimrc
67
.vim/vimrc
|
@ -30,21 +30,32 @@ Plug 'justmao945/vim-clang'
|
|||
Plug 'tpope/vim-surround'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'tpope/vim-repeat'
|
||||
Plug 'tpope/vim-speeddating'
|
||||
Plug 'tpope/vim-afterimage'
|
||||
Plug 'tpope/vim-jdaddy'
|
||||
Plug 'tpope/vim-unimpaired'
|
||||
Plug 'tpope/vim-ragtag'
|
||||
Plug 'gorodinskiy/vim-coloresque'
|
||||
Plug 'lpinilla/vim-codepainter'
|
||||
Plug 'rhysd/git-messenger.vim'
|
||||
Plug 'Yggdroot/indentLine'
|
||||
Plug 'cespare/vim-toml'
|
||||
Plug 'cespare/vim-toml', { 'for': 'toml' }
|
||||
Plug 'Glench/Vim-Jinja2-Syntax'
|
||||
Plug 'preservim/nerdcommenter'
|
||||
Plug 'preservim/nerdtree'
|
||||
Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||
Plug 'mfukar/robotframework-vim'
|
||||
Plug 'mfukar/robotframework-vim', { 'for': 'robotframework' }
|
||||
Plug 'roxma/nvim-yarp'
|
||||
Plug 'roxma/vim-hug-neovim-rpc'
|
||||
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||
Plug 'vim-syntastic/syntastic'
|
||||
"Plug 'rust-lang/rust.vim', { 'for': 'rust' }
|
||||
Plug 'majutsushi/tagbar'
|
||||
" Plug 'rust-lang/rust.vim', { 'for': 'rust' }
|
||||
call plug#end()
|
||||
|
||||
let g:palenight_terminal_italics=1
|
||||
let g:crystalline_theme = 'default'
|
||||
|
||||
let g:airline_powerline_fonts = 1
|
||||
let g:Powerline_symbols = "fancy" " sth like this probably set as a default but won't hurt here
|
||||
let g:airline_highlighting_cache = 1
|
||||
|
@ -53,10 +64,10 @@ let g:airline#extensions#tabline#enabled = 1
|
|||
let g:airline#extensions#tabline#formatter = 'unique_tail'
|
||||
|
||||
let g:gitgutter_terminal_reports_focus=0
|
||||
let g:gitgutter_async = 1
|
||||
let g:gitgutter_async = 0
|
||||
let g:gitgutter_sign_allow_clobber=0
|
||||
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
let g:deoplete#enable_at_startup = 0
|
||||
let g:deoplete#enable_ignore_case = 1
|
||||
|
||||
let g:livepreview_cursorhold_recompile = 0
|
||||
|
@ -74,14 +85,17 @@ let g:NERDTrimTrailingWhitespace = 1
|
|||
"""" Enable NERDCommenterToggle to check all selected lines is commented or not
|
||||
"""let g:NERDToggleCheckAllLines = 1
|
||||
" Add your own custom formats or override the defaults
|
||||
let g:NERDCustomDelimiters = { 'vim': { 'left': '"','right': '' }, 'c': { 'left': '/**','right': '*/' } }
|
||||
let g:NERDCustomDelimiters = { 'vim': { 'left': '"','right': '' }, 'c': { 'left': '/**','right': '*/' }, 'zsh': { 'left': '#','right': ''} }
|
||||
let g:NERDTreeGitStatusWithFlags = 1
|
||||
|
||||
let g:indentLine_setColors = 1
|
||||
let g:indentLine_char_list = ['|', '¦', '┆', '┊', ':']
|
||||
let g:indentLine_conceallevel = 1
|
||||
|
||||
|
||||
let g:git_messenger_close_on_cursor_moved = v:false
|
||||
let g:git_messenger_always_into_popup = v:true
|
||||
hi gitmessengerHash term=None guifg=#f0eaaa ctermfg=111
|
||||
|
||||
|
||||
let g:syntastic_always_populate_loc_list = 0
|
||||
|
@ -99,7 +113,8 @@ set statusline+=%{SyntasticStatuslineFlag()}
|
|||
set statusline+=%*
|
||||
|
||||
let g:syntastic_javascript_checkers = ['jsl']
|
||||
let g:syntastic_python_checkers = ['pylint']
|
||||
" let g:syntastic_python_checkers = ['pylint-3']
|
||||
let g:syntastic_python_checkers = ['flake8']
|
||||
let g:syntastic_c_compiler = 'clang'
|
||||
let g:syntastic_c_check_header = 1
|
||||
let g:syntastic_c_auto_refresh_includes = 1
|
||||
|
@ -108,17 +123,9 @@ let g:syntastic_cpp_auto_refresh_includes = 1
|
|||
let g:syntastic_c_cpplint_exec = 'cppcheck'
|
||||
|
||||
" change cursor shape for different editing modes, neovim does this by default
|
||||
if !has('nvim')
|
||||
if exists('$TMUX')
|
||||
let &t_SI = "\<Esc>Ptmux;\<Esc>\e[2 q\<Esc>\\"
|
||||
let &t_SR = "\<Esc>Ptmux;\<Esc>\e[4 q\<Esc>\\"
|
||||
let &t_EI = "\<Esc>Ptmux;\<Esc>\e[2 q\<Esc>\\"
|
||||
else
|
||||
let &t_SI = "\e[6 q"
|
||||
let &t_SR = "\e[4 q"
|
||||
let &t_EI = "\e[2 q"
|
||||
endif
|
||||
endif
|
||||
let &t_SI = "\e[6 q"
|
||||
let &t_SR = "\e[4 q"
|
||||
let &t_EI = "\e[2 q"
|
||||
|
||||
command! W execute 'silent w !sudo tee % >/dev/null' | edit!
|
||||
command! -nargs=* Make write | make! <args> | cwindow
|
||||
|
@ -129,29 +136,32 @@ nnoremap <silent> <Leader>tt :terminal<CR>
|
|||
noremap <F5> :set list!<CR>
|
||||
" make shortcut
|
||||
nnoremap <F4> :make!<cr>
|
||||
nnoremap <F8> :TagbarToggle<CR>
|
||||
" NERDTree
|
||||
nmap <Leader>nt :NERDTreeToggle<CR>
|
||||
|
||||
vmap gb :<C-U>!git blame % -L<C-R>=line("'<") <CR>,<C-R>=line("'>") <CR><CR>
|
||||
nmap gb :!git blame %<CR>
|
||||
nmap <silent> <Leader>ll :w! !pdflatex -shell-escape -interaction=nonstopmode $PWD/*.tex<CR><CR>
|
||||
nnoremap gb :!git blame %<CR>
|
||||
nnoremap <silent> <Leader>ll :w! !pdflatex -shell-escape -interaction=nonstopmode $PWD/*.tex<CR><CR>
|
||||
nnoremap <Leader>l :exec &conceallevel ? "set conceallevel=0" : "set conceallevel=1"<CR>
|
||||
|
||||
|
||||
" ------ wayland copy
|
||||
xnoremap "+y y:call system("wl-copy", @")<cr>
|
||||
nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', '', 'g')<cr>p
|
||||
xnoremap <silent>"+y y:call system("wl-copy", @")<cr>
|
||||
nnoremap <silent>"+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', '', 'g')<cr>p
|
||||
nnoremap "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '<C-v><C-m>', '', 'g')<cr>p
|
||||
|
||||
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<left>"
|
||||
|
||||
" ------ autocmd ------
|
||||
|
||||
" Enable omni completion.
|
||||
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
|
||||
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
|
||||
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
|
||||
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
|
||||
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
|
||||
" autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
|
||||
" autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
|
||||
" autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
|
||||
" autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
|
||||
" autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
|
||||
|
||||
" automatically open NERDTree if vim is open on it's own (argc() ==0 )
|
||||
" autocmd StdinReadPre * let s:std_in=1
|
||||
|
@ -266,6 +276,7 @@ set listchars=trail:•,tab:>-
|
|||
set list " show/hide tabs and EOL chars (hidden characters)
|
||||
set confirm " ask confirmation like save before quit.
|
||||
set wildmenu " Tab completion menu when using command mode
|
||||
set wildmode=longest:longest,full
|
||||
set scrolloff=5 " scroll offset, min lines above/below cursor
|
||||
"set scrolljump=5 " jump 5 lines when running out of the screen - NO
|
||||
set sidescroll=10 " minimum columns to scroll horizontally
|
||||
|
@ -290,7 +301,7 @@ set updatetime=1000
|
|||
syntax enable
|
||||
colo palenight " new fav highlighting
|
||||
set conceallevel=0 " for jsons
|
||||
set ttymouse= " tmux mouse behaviour
|
||||
set ttymouse=sgr " tmux mouse behaviour
|
||||
set mouse=a " enable mouse in n,v,i,c,h modes
|
||||
|
||||
set laststatus=2 " show powerline status bar
|
||||
|
|
Loading…
Reference in New Issue