[VIM] Fix multiple 'small' annoyances
This commit is contained in:
parent
82c73b7b0d
commit
f3c30ab353
10
vim/.vimrc
10
vim/.vimrc
@ -49,6 +49,11 @@ colorscheme happy_hacking
|
||||
|
||||
" Turn on the Wild menu
|
||||
set wildmenu
|
||||
set wildmode=list:longest
|
||||
|
||||
|
||||
"
|
||||
set updatetime=300
|
||||
|
||||
" Ignore compiled files
|
||||
set wildignore=*.o,*~,*.pyc
|
||||
@ -76,3 +81,8 @@ source ~/.vim/config/filetypes.vim
|
||||
|
||||
" Transparency
|
||||
hi Normal guibg=NONE ctermbg=NONE
|
||||
|
||||
" Prevent accidental writes to buffers that shouldn't be edited
|
||||
autocmd BufRead *.orig set readonly
|
||||
autocmd BufRead *.pacnew set readonly
|
||||
set nofoldenable
|
||||
|
@ -55,3 +55,6 @@ nmap <F2> :TagbarToggle<CR>
|
||||
" Rmarkdown
|
||||
autocmd Filetype rmd nmap <F5> :w\|:!echo<space>"require(rmarkdown);<space>render('<c-r>%')"<space>\|<space>R<space>--vanilla<enter>
|
||||
autocmd Filetype rmd imap <F5> <ESC><ESC>:w\|:!echo<space>"require(rmarkdown);<space>render('<c-r>%')"<space>\|<space>R<space>--vanilla<enter>
|
||||
|
||||
map <F1> <Esc>
|
||||
imap <F1> <Esc>
|
||||
|
@ -151,6 +151,9 @@ augroup end
|
||||
xmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
nmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
|
||||
" Implement methods for trait
|
||||
nnoremap <silent> <space>i :call CocActionAsync('codeAction', '', 'Implement missing members')<cr>
|
||||
|
||||
" Remap for do codeAction of current line
|
||||
nmap <leader>ac <Plug>(coc-codeaction)
|
||||
" Fix autofix problem of current line
|
||||
@ -198,3 +201,9 @@ nnoremap <silent> <space>p :<C-u>CocListResume<CR>
|
||||
|
||||
" Open Tagbar
|
||||
autocmd VimEnter * nested :call tagbar#autoopen(1)
|
||||
" Open NerdTREE
|
||||
autocmd VimEnter * NERDTree | wincmd p
|
||||
|
||||
" If another buffer tries to replace NERDTree, put it in the other window, and bring back NERDTree.
|
||||
autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 |
|
||||
\ let buf=bufnr() | buffer# | execute "normal! \<C-W>w" | execute 'buffer'.buf | endif
|
||||
|
@ -4,34 +4,47 @@ call plug#begin('~/.vim/plugged')
|
||||
Plug 'roxma/vim-hug-neovim-rpc'
|
||||
Plug 'roxma/nvim-yarp'
|
||||
|
||||
Plug 'andymass/vim-matchup'
|
||||
|
||||
" Accept .editorconfig
|
||||
Plug 'editorconfig/editorconfig-vim'
|
||||
|
||||
" Miscellaneous Plugins
|
||||
" Deoplete Source
|
||||
Plug 'Shougo/neco-vim'
|
||||
" Multiuse- tab key
|
||||
" Plug 'ervandew/supertab'
|
||||
|
||||
" Airline style status bar
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
|
||||
" Highlight and fix trailing whitespace
|
||||
Plug 'ntpeters/vim-better-whitespace'
|
||||
|
||||
" Yank History Cycling on meta-[shift]-p
|
||||
Plug 'maxbrunsfeld/vim-yankstack'
|
||||
|
||||
" Auto indent
|
||||
Plug 'yggdroot/indentline'
|
||||
|
||||
" Python folding
|
||||
Plug 'tmhedberg/simpylfold'
|
||||
|
||||
" Update folding less often
|
||||
Plug 'Konfekt/fastfold'
|
||||
|
||||
" Use FZF for browsing vim buffers
|
||||
Plug 'junegunn/fzf.vim'
|
||||
|
||||
" Markdown support
|
||||
Plug 'plasticboy/vim-markdown'
|
||||
|
||||
" Window resizing c-w [<>-+=_|]
|
||||
Plug 'roxma/vim-window-resize-easy'
|
||||
|
||||
" Regex highlighting and in buffer live replacement
|
||||
Plug 'markonm/traces.vim'
|
||||
|
||||
" Better comments
|
||||
Plug 'scrooloose/nerdcommenter'
|
||||
|
||||
" Work on brackets in pairs
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
|
||||
@ -41,15 +54,13 @@ Plug 'jistr/vim-nerdtree-tabs'
|
||||
Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||
Plug 'ryanoasis/vim-devicons'
|
||||
|
||||
Plug 'junegunn/goyo.vim'
|
||||
|
||||
" Compilers
|
||||
Plug 'xuhdev/singlecompile'
|
||||
|
||||
" Autocomplete
|
||||
" Plug 'Shougo/deoplete.nvim'
|
||||
" Plug 'zchee/deoplete-jedi'
|
||||
Plug 'neoclide/coc.nvim', {'tag': '*', 'branch': 'release'}
|
||||
Plug 'neoclide/coc-snippets'
|
||||
Plug 'honza/vim-snippets'
|
||||
|
||||
" Coc extensions
|
||||
Plug 'Maxattax97/coc-ccls'
|
||||
@ -70,7 +81,12 @@ Plug 'udalov/kotlin-vim'
|
||||
Plug 'xuhdev/vim-latex-live-preview'
|
||||
Plug 'pearofducks/ansible-vim'
|
||||
Plug 'justinmk/vim-syntax-extra'
|
||||
" Plug 'rhysd/vim-clang-format'
|
||||
" Rust
|
||||
Plug 'timonv/vim-cargo'
|
||||
Plug 'rust-lang/rust.vim'
|
||||
|
||||
Plug 'cespare/vim-toml'
|
||||
|
||||
|
||||
" Git integration
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
@ -83,6 +99,5 @@ Plug 'godlygeek/tabular'
|
||||
Plug 'plasticboy/vim-markdown'
|
||||
|
||||
Plug 'majutsushi/tagbar'
|
||||
Plug 'rust-lang/rust.vim'
|
||||
|
||||
call plug#end()
|
||||
|
Loading…
Reference in New Issue
Block a user