-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvimrc
104 lines (78 loc) · 2.47 KB
/
vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
" ~/.vimrc
" Plugin manager: vim-plug
"
" See installation instructions:
" https://github.com/junegunn/vim-plug#unix
"
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
"
" Change the mapleader from \ to ,
let mapleader = ","
" Let vim-plug do its thing.
" After adding new plugins, reload, and then use :PlugInstall
call plug#begin()
" Install Plugins {{{
" BufExplorer Plugin for Vim
Plug 'jlanzarotta/bufexplorer'
" NERDTree
Plug 'preservim/nerdtree'
" }}}
" Initialize the plugin system
call plug#end()
" Load some default settings
source ~/.vim/defaults.vim
" Configure Plugins {{{
" --- BufExplorer settings {{{
" To use:
" '<Leader>be' normal open
" '<Leader>bs' horizontal split open
" '<Leader>bv' vertical split open
let g:bufExplorerDefaultHelp=0
"let g:bufExplorerDetailedHelp=1
let g:bufExplorerFindActive=0
let g:bufExplorerShowUnlisted=0
"let g:bufExplorerSortBy='mru'
let g:bufExplorerSplitBelow=1
let g:bufExplorerSplitOutPathName=1
let g:bufExplorerSplitRight=1
" }}}
" --- NERDTree settings {{{
" Toggle the NERD Tree
nmap <silent> <Leader>n :NERDTreeToggle<CR>
" Store the bookmarks
let NERDTreeBookmarksFile=expand("$HOME/.vim/tmp/NERDTreeBookmarks")
" Show the bookmarks table on startup?
let NERDTreeShowBookmarks=0
" Show hidden files?
let NERDTreeShowFiles=1
let NERDTreeShowHidden=1
" Quit on opening files from the tree?
let NERDTreeQuitOnOpen=0
" Highlight the selected entry in the tree?
let NERDTreeHighlightCursorline=0
" 1 - Double click to open nodes
" 2 - Single click to open directories, and double click to open files
" 3 - Single click to open nodes
let NERDTreeMouseMode=3
" Don't display these kinds of files
let NERDTreeIgnore=[
\ '\.pyc$', '\.pyo$', '\.pyd$', '\.egg$',
\ '\.class$', '\.beam$', '\.obj$', '\.o$', '\.so$', '\.a$',
\ '^\.git$', '^\.svn$',
\ '^__pycache__$', '^.ipynb_checkpoints$', '^.pytest_cache$'
\ ]
" Default key to activate node is 'o'
let NERDTreeMapActivateNode='<Space>'
" }}}
" }}}
" HACK: Since Command-T doesn't have an option to filter out patterns,
" we filter out `venv` directory via `wildignore` setting.
set wildignore+=*.swp,*.bak,*.pyc,*.class,*.o,venv
" Lastly, load ~/.vim/user.vim if it exists.
" note that this file is not kept in the repository, and therefore
" we can use it to load machine-specific settings
if filereadable(expand("~/.vim/user.vim"))
source ~/.vim/user.vim
endif
" vim: fen fdl=0 fdm=marker