VIM: Change keybindings; Fix Coc.nvim not installing correctly
This commit is contained in:
parent
373368a024
commit
4e370073b6
@ -21,10 +21,10 @@ imap <F3> <ESC><ESC>:Buffers<CR>
|
||||
vmap <F3> <ESC><ESC>:Buffers<CR>
|
||||
|
||||
" Nerdtree
|
||||
nmap <silent> <F4> <ESC>:NERDTreeToggle<CR>
|
||||
nmap <silent> <F2> <ESC>:NERDTreeToggle<CR>
|
||||
|
||||
" Workspaces
|
||||
nmap <F6> :ToggleWorkspace<CR>
|
||||
" Tagbar
|
||||
nmap <F4> :TagbarToggle<CR>
|
||||
|
||||
" SingleCompile
|
||||
nmap <F8> :SCChooseCompiler<CR>
|
||||
@ -50,7 +50,6 @@ cmap w!! w !sudo tee > /dev/null %
|
||||
" Toggle Case
|
||||
nmap <C-c> g~iw
|
||||
|
||||
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>
|
||||
|
@ -22,13 +22,7 @@ autocmd TextChanged * GitGutter
|
||||
|
||||
|
||||
" JavaComplete
|
||||
if has("autocmd")
|
||||
autocmd Filetype java setlocal omnifunc=javacomplete#CompleteParamsInfo
|
||||
endif
|
||||
|
||||
|
||||
" Deoplete
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
autocmd Filetype java setlocal omnifunc=javacomplete#CompleteParamsInfo
|
||||
|
||||
|
||||
" NerdCommenter
|
||||
@ -50,10 +44,6 @@ augroup NERDTree
|
||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
||||
augroup end
|
||||
|
||||
" PyMode
|
||||
let g:pymode_lint = 0
|
||||
let g:pymode_syntax = 0
|
||||
let g:pymode_syntax_all = 1
|
||||
|
||||
" python syntax
|
||||
let g:python_highlight_all = 1
|
||||
@ -66,6 +56,7 @@ let g:SimpylFold_docstring_preview = 1
|
||||
" Ale
|
||||
let g:ale_linters = {"python": ["flake8"], "python3": ["flake8"]}
|
||||
|
||||
|
||||
" VIM-MARKDOWN
|
||||
let g:markdown_syntax_conceal=0
|
||||
let g:vim_markdown_conceal = 0
|
||||
@ -75,10 +66,18 @@ let g:vim_markdown_conceal = 0
|
||||
autocmd BufEnter *[^(.rmd|.snippets)] EnableStripWhitespaceOnSave
|
||||
autocmd BufEnter *.snippets DisableStripWhitespaceOnSave
|
||||
|
||||
|
||||
" Yankstack
|
||||
let g:yankstack_map_keys = 0
|
||||
call yankstack#setup()
|
||||
|
||||
" Copilot
|
||||
imap <silent><script><expr> <a-cr> copilot#Accept("\<CR>")
|
||||
let g:copilot_no_tab_map = v:true
|
||||
ino <TAB> <NOP>
|
||||
highlight CopilotSuggestion guifg=#FFAF5F ctermfg=8
|
||||
|
||||
|
||||
" CoC nvim
|
||||
set hidden
|
||||
set nobackup
|
||||
@ -104,9 +103,9 @@ inoremap <silent><expr> <c-space> coc#refresh()
|
||||
|
||||
" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current position.
|
||||
" Coc only does snippet and additional edit on confirm.
|
||||
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||
" inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||
" Or use `complete_info` if your vim support it, like:
|
||||
" inoremap <expr> <cr> complete_info()["selected"] != "-1" ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||
inoremap <expr> <cr> complete_info()["selected"] != "-1" ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||
|
||||
" Use `[g` and `]g` to navigate diagnostics
|
||||
nmap <silent> gp <Plug>(coc-diagnostic-prev)
|
||||
@ -207,3 +206,7 @@ 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
|
||||
|
||||
|
||||
" Vim-markdown
|
||||
let g:vim_markdown_conceal = 0
|
||||
|
@ -1,9 +1,8 @@
|
||||
call plug#begin('~/.vim/plugged')
|
||||
|
||||
" Dependencies
|
||||
Plug 'roxma/vim-hug-neovim-rpc'
|
||||
Plug 'roxma/nvim-yarp'
|
||||
|
||||
" % works on language specific keywords
|
||||
Plug 'andymass/vim-matchup'
|
||||
|
||||
" Accept .editorconfig
|
||||
@ -55,8 +54,7 @@ Plug 'ryanoasis/vim-devicons'
|
||||
Plug 'xuhdev/singlecompile'
|
||||
|
||||
" Autocomplete
|
||||
Plug 'neoclide/coc.nvim', {'tag': '*', 'branch': 'release'}
|
||||
Plug 'neoclide/coc-snippets'
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
Plug 'honza/vim-snippets'
|
||||
|
||||
" Coc extensions
|
||||
@ -69,11 +67,13 @@ Plug 'w0rp/ale'
|
||||
Plug 'hdima/python-syntax'
|
||||
Plug 'fs111/pydoc.vim'
|
||||
Plug 'Vimjas/vim-python-pep8-indent'
|
||||
|
||||
Plug 'vim-scripts/javacomplete'
|
||||
Plug 'udalov/kotlin-vim'
|
||||
Plug 'xuhdev/vim-latex-live-preview'
|
||||
Plug 'pearofducks/ansible-vim'
|
||||
Plug 'justinmk/vim-syntax-extra'
|
||||
|
||||
" Rust
|
||||
Plug 'timonv/vim-cargo'
|
||||
Plug 'rust-lang/rust.vim'
|
||||
@ -92,7 +92,7 @@ Plug 'godlygeek/tabular'
|
||||
Plug 'plasticboy/vim-markdown'
|
||||
|
||||
Plug 'majutsushi/tagbar'
|
||||
Plug 'jremmen/vim-ripgrep'
|
||||
Plug 'rad4day/vim-ripgrep'
|
||||
|
||||
Plug 'github/copilot.vim'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user