-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_vimrc.legacy
148 lines (106 loc) · 4.21 KB
/
_vimrc.legacy
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
"------------------------------------------------------------------------------
" The vim-plug management
"
" :PlugInstall // Install the plugins
" :PlugStatus // Check plugins status
" :PlugUpdate // Update all the plugins
" :PlugUpgrade // Update the vim-plug itself
" :PlugClean // Clean plugins
"
"------------------------------------------------------------------------------
" The plugins tagbar and vim-flake8 have dependencies on ctags and flake8
" respectively. Install ctags binary and pip install flake8 (in virtualenv).
"
"
" The vim-plug starts with plugin installing destination
call plug#begin('~/.vim/plugged') " under macos/linux
"call plug#begin('C:\Users\your_username\vimfiles\plugged') " under windows
" One stop shop for vim colorschemes
Plug 'flazz/vim-colorschemes'
" Load NERDTree conditionally
Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'}
" Block code comments toggling
Plug 'preservim/nerdcommenter'
" Fuzzy finding files. The fzf might be better but has binary fzf dependency
Plug 'ctrlpvim/ctrlp.vim'
" Automatic closing of quotes, parenthesis, brackets, etc
Plug 'raimondi/delimitmate'
" The tagbar that overviews the structure of source file. It depends on ctags
Plug 'majutsushi/tagbar'
" The indentLine for languages like python, golang, etc
Plug 'Yggdroot/indentLine'
" Auto completion for python
Plug 'davidhalter/jedi-vim'
" Static grammar checking for python. Need pip install flake8 separately
Plug 'nvie/vim-flake8'
" The language rust official plugin
Plug 'rust-lang/rust.vim'
" The vim-plug ends here
call plug#end()
"------------------------------------------------------------------------------
" Basic settings
"
" Set 'nocompatible' to ward off unexpected things that your distro might
" have made, as well as sanely reset options when re-sourcing .vimrc
set nocompatible
" Attempt to determine the type of a file based on its name and possibly its
" contents. Use this to allow intelligent auto-indenting for each filetype,
" and for plugins that are filetype specific.
filetype indent plugin on
" When opening a new line and no filetype-specific indenting is enabled, keep
" the same indent as the line you're currently on. Useful for READMEs, etc.
set autoindent
" Enable syntax highlighting
syntax on
" Better command-line completion
set wildmenu
" Highlight searches (use <C-L> to temporarily turn off highlighting; see the
" mapping of <C-L> below)
set hlsearch
" Display the cursor position on the last line of the screen or in the status
" line of a window
set ruler
" The cursor line highlighted
set cursorline
" Enable use of the mouse for all modes
set mouse=a
" Allow backspacing over autoindent, line breaks and start of insert action
set backspace=indent,eol,start
" No line wrap
set nowrap
" The terminal window scroll buffer size, default 10000 lines
set termwinscroll=10000
"------------------------------------------------------------------------------
"tab related settings
"
set expandtab " use space to replace tab
set tabstop=4 " space number
set shiftwidth=4 " auto indent width
"------------------------------------------------------------------------------
" GUI related settings
"
"set guioptions-=t " remove tool bar for gui
"set guioptions-=m " remove menu bar for gui
"set guifont=Menlo\ Regular:h14 " works under linux/macos
"set guifont=DejaVu_Sans_Mono:h13 " works under win
"------------------------------------------------------------------------------
" Color scheme settings
"
syntax enable
set background=dark " dark or light
"colorscheme PaperColor " gruvbox, molokai, PaperColor, solarized, koehler
"------------------------------------------------------------------------------
" Mappings
" Change the mappings in case they conflict with others on your system
"
" Map <C-L> (redraw screen) to also turn off search highlighting until the
" next search
nnoremap <C-L> :nohl<CR><C-L>
" Use F7 to run vim-flake8
" F7 is the default mapping for vim-flake8
" Use F8 to open/close NERDTree side panel
nmap <F8> :NERDTreeToggle<CR>
" Use F9 to open/close tagbar side panel
nmap <F9> :TagbarToggle<CR>
" Re-Map jedi completion key from <C-Space> when ssh from powershell in windows
"let g:jedi#completions_command = "<C-H>"