mirror of
https://github.com/tomru/DotfilesOld.git
synced 2026-03-03 14:37:25 +01:00
add nerdtree, remove gutentags
This commit is contained in:
79
vim/.vimrc
79
vim/.vimrc
@@ -2,12 +2,16 @@
|
||||
" author: Thomas Ruoff
|
||||
|
||||
" Basics {{{
|
||||
set encoding=utf-8
|
||||
set hidden
|
||||
|
||||
set ttyfast
|
||||
set lazyredraw
|
||||
set updatetime=300
|
||||
set synmaxcol=512
|
||||
|
||||
set modeline
|
||||
|
||||
set nobackup
|
||||
set noswapfile
|
||||
|
||||
@@ -20,6 +24,12 @@ set wildignore+=*.swp,*.bak,*.jpg,*.gif,*.png,*.git,
|
||||
set splitright
|
||||
set splitbelow
|
||||
|
||||
" Always show the status line
|
||||
set laststatus=2
|
||||
set cmdheight=2
|
||||
|
||||
set shortmess+=c
|
||||
|
||||
" yank delete change and put operations go by default in `"+` register
|
||||
" so in the systems clipboard accessable by CTRL-V on all OS types
|
||||
if has('mac')
|
||||
@@ -103,38 +113,58 @@ Plug 'tpope/vim-projectionist'
|
||||
Plug 'mbbill/undotree'
|
||||
nnoremap <leader>u :UndotreeToggle<cr>
|
||||
|
||||
Plug 'w0rp/ale'
|
||||
nmap <silent> [a <Plug>(ale_previous_wrap)
|
||||
nmap <silent> <C-j> <Plug>(ale_next_wrap)
|
||||
let g:ale_linters = {}
|
||||
let g:ale_linters.javascript = ['eslint']
|
||||
let g:ale_fixers = {}
|
||||
let g:ale_fixers.javascript = ['eslint']
|
||||
let g:ale_fix_on_save = 1
|
||||
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
" Remap keys for gotos
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent> gy <Plug>(coc-type-definition)
|
||||
nmap <silent> gi <Plug>(coc-implementation)
|
||||
nmap <silent> gr <Plug>(coc-references)
|
||||
" Use `[c` and `]c` to navigate diagnostics
|
||||
|
||||
" Use `[d` and `]d` to navigate diagnostics
|
||||
nmap <silent> [d <Plug>(coc-diagnostic-prev)
|
||||
nmap <silent> ]d <Plug>(coc-diagnostic-next)
|
||||
" Remap for rename current word
|
||||
nmap <leader>rn <Plug>(coc-rename)
|
||||
" Remap for do codeAction of current line
|
||||
nmap <leader>ac <Plug>(coc-codeaction)
|
||||
" Applying codeAction to the selected region.
|
||||
" Example: `<leader>aap` for current paragraph
|
||||
xmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
nmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
" Fix autofix problem of current line
|
||||
nmap <leader>qf <Plug>(coc-fix-current)
|
||||
" Use <c-space> to trigger completion.
|
||||
if has('nvim')
|
||||
inoremap <silent><expr> <c-space> coc#refresh()
|
||||
else
|
||||
inoremap <silent><expr> <c-@> coc#refresh()
|
||||
endif
|
||||
|
||||
" Make <CR> auto-select the first completion item and notify coc.nvim to
|
||||
" format on enter, <cr> could be remapped by other vim plugin
|
||||
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
|
||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||
|
||||
" Use K to show documentation in preview window.
|
||||
nnoremap <silent> K :call <SID>show_documentation()<CR>
|
||||
|
||||
function! s:show_documentation()
|
||||
if (index(['vim','help'], &filetype) >= 0)
|
||||
execute 'h '.expand('<cword>')
|
||||
elseif (coc#rpc#ready())
|
||||
call CocActionAsync('doHover')
|
||||
else
|
||||
execute '!' . &keywordprg . " " . expand('<cword>')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Formatting selected code.
|
||||
xmap <leader>f <Plug>(coc-format-selected)
|
||||
nmap <leader>f <Plug>(coc-format-selected)
|
||||
|
||||
Plug 'itchyny/lightline.vim'
|
||||
if filereadable(expand("~/.vim/lightline.vim"))
|
||||
source ~/.vim/lightline.vim
|
||||
augroup ale-statusline
|
||||
autocmd!
|
||||
autocmd User ALELint call lightline#update()
|
||||
augroup END
|
||||
endif
|
||||
|
||||
function! LightlineReload()
|
||||
@@ -167,17 +197,18 @@ Plug 'janko-m/vim-test'
|
||||
let test#strategy = "vimterminal"
|
||||
|
||||
" vim 8 plugins
|
||||
if v:version >= 800
|
||||
Plug 'ludovicchabant/vim-gutentags'
|
||||
let g:gutentags_cache_dir="~/.tags"
|
||||
let g:gutentags_file_list_command = {
|
||||
\ 'markers': {
|
||||
\ '.git': 'git ls-files',
|
||||
\ '.hg': 'hg files',
|
||||
\ },
|
||||
\ }
|
||||
endif
|
||||
" if v:version >= 800
|
||||
" Plug 'ludovicchabant/vim-gutentags'
|
||||
" let g:gutentags_cache_dir="~/.tags"
|
||||
" let g:gutentags_file_list_command = {
|
||||
" \ 'markers': {
|
||||
" \ '.git': 'git ls-files',
|
||||
" \ '.hg': 'hg files',
|
||||
" \ },
|
||||
" \ }
|
||||
" endif
|
||||
|
||||
Plug 'preservim/nerdtree'
|
||||
|
||||
" debug
|
||||
Plug 'tweekmonster/startuptime.vim'
|
||||
|
||||
Reference in New Issue
Block a user