vim: add some more plugins
This commit is contained in:
parent
4597e32fe5
commit
b3584b9475
69
.vimrc
69
.vimrc
@ -28,6 +28,9 @@
|
||||
" gc comment/uncomment
|
||||
" C-K indent selection
|
||||
" \-a Set Kernel Coding style
|
||||
" from a.vim
|
||||
" :A[SVTN] Switch between header/file , split, vertical, tab, next match
|
||||
" :IH[SVTN] Switch to file under cursor
|
||||
" Use snippets with tab e.g : for <tab> (see .vim/bundle/vim-snippets/snippets for available
|
||||
" snippets)
|
||||
" look at :help index
|
||||
@ -229,8 +232,8 @@ endfu
|
||||
" detect indentation see http://www.freehackers.org/Indent_Finder
|
||||
autocmd BufReadPost /* call DetectIndent()
|
||||
|
||||
map <C-K> :py3f ~/.vim/syntax/clang-format.py<CR>
|
||||
imap <C-K> <ESC>:py3f ~/.vim/syntax/clang-format.py<CR>i
|
||||
noremap <C-K> :py3f ~/.vim/syntax/clang-format.py<CR>
|
||||
inoremap <C-K> <ESC>:py3f ~/.vim/syntax/clang-format.py<CR>i
|
||||
|
||||
set wildignore+=*.o,*.d,*.dex,*.class,*.png,*.jpeg,*.jpg,*.pdf
|
||||
|
||||
@ -275,6 +278,8 @@ let Tlist_Use_Right_Window = 1
|
||||
" open/close tag list window with F8
|
||||
"map <silent> <F8> :TlistToggle<CR>
|
||||
nmap <F8> :TagbarToggle<CR>
|
||||
"map <silent> <F8> :Vista!!<CR>
|
||||
|
||||
|
||||
" close preview window after a completion
|
||||
if has("autocmd")
|
||||
@ -354,10 +359,23 @@ runtime! ftplugin/man.vim
|
||||
nmap <silent> <S-F1> :tabe ~/.vimrc<CR>gg
|
||||
imap <S-F1> <Esc><S-F1>
|
||||
" show contextual help with F1
|
||||
|
||||
" get doc of std::string instead of string
|
||||
" Need installation of cppMan
|
||||
function! s:JbzCppMan()
|
||||
let old_isk = &iskeyword
|
||||
setl iskeyword+=:
|
||||
let str = expand("<cword>")
|
||||
let &l:iskeyword = old_isk
|
||||
execute 'Man ' . str
|
||||
endfunction
|
||||
|
||||
function Help()
|
||||
try
|
||||
if exists('b:current_syntax') && b:current_syntax == "python"
|
||||
:call ShowPyDoc(expand("<cword>"), 1)
|
||||
elseif exists('b:current_syntax') && b:current_syntax == "cpp"
|
||||
:call s:JbzCppMan()
|
||||
elseif has_key(g:LanguageClient_serverCommands, &filetype)
|
||||
:call LanguageClient#textDocument_hover()
|
||||
else
|
||||
@ -536,6 +554,9 @@ call vundle#begin()
|
||||
" let Vundle manage Vundle, required
|
||||
Plugin 'gmarik/Vundle.vim'
|
||||
|
||||
"Rust
|
||||
Plugin 'rust-lang/rust.vim'
|
||||
|
||||
" Show current modified line
|
||||
Plugin 'airblade/vim-gitgutter'
|
||||
" Communication with git
|
||||
@ -567,6 +588,7 @@ Plugin 'tomtom/tlib_vim'
|
||||
Plugin 'MarcWeber/vim-addon-mw-utils'
|
||||
Plugin 'honza/vim-snippets'
|
||||
Plugin 'garbas/vim-snipmate'
|
||||
let g:snipMate = { 'snippet_version' : 1 }
|
||||
Plugin 'sirver/ultisnips'
|
||||
let g:UltiSnipsExpandTrigger = '<tab>'
|
||||
let g:UltiSnipsListSnippets = '<s-tab>'
|
||||
@ -601,10 +623,14 @@ nnoremap <silent> <leader>O :FZF!<CR>
|
||||
|
||||
if v:version >= 800
|
||||
" Async lint
|
||||
"Plugin 'w0rp/ale'
|
||||
" Plugin 'w0rp/ale'
|
||||
let g:ale_fixers = {
|
||||
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
||||
\}
|
||||
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
||||
\}
|
||||
let g:ale_linters = {
|
||||
\ 'cpp': ['clangd'],
|
||||
\}
|
||||
|
||||
Plugin 'autozimu/LanguageClient-neovim', {
|
||||
\ 'oninstall': 'bash install.sh',
|
||||
\ }
|
||||
@ -733,4 +759,37 @@ let g:tmux_navigator_no_mappings=1
|
||||
Plugin 'junegunn/vim-peekaboo'
|
||||
|
||||
Plugin 'patashish704/pandoc-complete'
|
||||
|
||||
" Debugger
|
||||
Plugin 'puremourning/vimspector'
|
||||
"let g:vimspector_enable_mappings = 'HUMAN'
|
||||
|
||||
" Open browser related things
|
||||
Plugin 'tyru/open-browser.vim'
|
||||
let g:openbrowser_search_engines = extend(
|
||||
\ get(g:, 'openbrowser_search_engines', {}),
|
||||
\ {
|
||||
\ 'cppreference': 'https://en.cppreference.com/mwiki/index.php?title=Special%3ASearch&search={query}',
|
||||
\ 'qt': 'https://doc.qt.io/qt-5/search-results.html?q={query}',
|
||||
\ 'devdoc': 'https://devdocs.io/#q={query}',
|
||||
\ 'github-cpp': 'http://github.com/search?l=C%2B%2B&q=fork%3Afalse+language%3AC%2B%2B+{query}&type=Code',
|
||||
\ 'en2fr': 'http://translate.google.fr/translate_t?hl=fr&ie=UTF-8&text={query}&sl=en&tl=fr#',
|
||||
\ 'fr2en': 'http://translate.google.fr/translate_t?hl=fr&ie=UTF-8&text={query}&sl=fr&tl=en#',
|
||||
\ 'verbe' : 'http://www.la-conjugaison.fr/du/verbe/{query}.php'
|
||||
\ },
|
||||
\ 'keep'
|
||||
\)
|
||||
nnoremap <silent> <leader>osx :call openbrowser#smart_search(expand('<cword>'), "cppreference")<CR>
|
||||
nnoremap <silent> <leader>osq :call openbrowser#smart_search(expand('<cword>'), "qt")<CR>
|
||||
nnoremap <silent> <leader>osd :call openbrowser#smart_search(expand('<cword>'), "devdoc")<CR>
|
||||
nnoremap <silent> <leader>osen2fr :call openbrowser#smart_search(expand('<cword>'), "en2fr")<CR>
|
||||
nnoremap <silent> <leader>osfr2en :call openbrowser#smart_search(expand('<cword>'), "fr2en")<CR>
|
||||
|
||||
" A recent tagbar
|
||||
Plugin 'liuchengxu/vista.vim'
|
||||
" highlight other use of he word under the cursor
|
||||
Plugin 'RRethy/vim-illuminate'
|
||||
" Parentheses with various colors
|
||||
Plugin 'luochen1990/rainbow'
|
||||
let g:rainbow_active = 1 "set to 0 if you want to enable it later via :RainbowToggle
|
||||
call vundle#end()
|
||||
|
Loading…
Reference in New Issue
Block a user