Add nerdtree

This commit is contained in:
Cyryl Płotnicki 2019-02-22 16:08:40 +00:00
parent a2eb2171db
commit 97644020df
5 changed files with 16 additions and 11 deletions

2
.vimrc
View file

@ -1,4 +1,4 @@
source ~/dev/dotfiles/.vimrc.settings
source ~/dev/dotfiles/.vimrc.plugins
source ~/dev/dotfiles/.vimrc.plugins-settings
source ~/dev/dotfiles/.vimrc.settings
source ~/dev/dotfiles/.vimrc.keymap

View file

@ -6,6 +6,7 @@ nmap <leader>t :wa <bar> :Make test<CR>
" navigate buffers by ctrl-b
nmap <C-b> :bprevious<CR>
nmap <C-B> :bnext<CR>
nnoremap ; :
@ -27,4 +28,7 @@ nnoremap <leader>v :FzfFiles<cr>
nnoremap <leader>u :FzfTags<cr>
nnoremap <leader>j :call fzf#vim#tags("'".expand('<cword>'))<cr>
nnoremap <leader>/ :Find
nnoremap <leader>' :execute "Find " . expand("<cword>")<cr>
nnoremap <leader>' :execute "Find " . expand("<cword>")<cr>
" tree
map <leader>n :NERDTreeToggle<CR>

View file

@ -22,6 +22,7 @@ Plug 'prabirshrestha/vim-lsp'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
Plug 'rust-lang/rust.vim'
Plug 'scrooloose/nerdtree'
Plug 'timonv/vim-cargo'
Plug 'tpope/vim-cucumber'
Plug 'tpope/vim-dispatch'
@ -31,5 +32,6 @@ Plug 'tpope/vim-surround'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'will133/vim-dirdiff'
Plug 'Xuyuanp/nerdtree-git-plugin'
call plug#end()
call plug#end()

View file

@ -10,9 +10,8 @@ let g:rustfmt_autosave = 1
let $FZF_DEFAULT_COMMAND = 'rg --files --no-messages "" .'
set grepprg=rg\ --vimgrep
let g:fzf_command_prefix = 'Fzf'
" :Find <term> runs `rg <term>` and passes it to fzf
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>), 1, <bang>0)
let g:ctrlp_show_hidden = 1
" register rust rls
if executable('rls')
@ -22,3 +21,7 @@ if executable('rls')
\ 'whitelist': ['rust'],
\ })
endif
" nerdtree startup
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif

View file

@ -30,11 +30,7 @@ set t_Co=256
syntax enable
set background=dark
highlight clear SignColumn
try
colorscheme solarized
catch /^Vim\%((\a\+)\)\=:E185/
colorscheme desert
endtry
colorscheme solarized
" appearance
set number
@ -51,4 +47,4 @@ augroup END
" vimdiff
set diffopt+=iwhite
set diffexpr=""
set diffexpr=""