guest@dotshare [~/groups/vim/rc] $ ls my-nvim-config/ | cat

my nvim config (scrot, raw, dl)

TaTooKa Jun 04, 2018 (vim/rc)

SCROT

  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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
set background=dark
let base16colorspace=256  " Access colors present in 256 colorspace
set relativenumber
set number
set hlsearch
se si
se incsearch
se expandtab
se ts=4 sw=4
filetype plugin on
se t_Co=256
se mouse=a
se cursorline
se cursorcolumn
se ignorecase
set encoding=utf-8
set guifont=Hurmit\ Nerd\ Font\ Mono\ Medium\ 12

" Theme
"colorscheme monokai-tatooka
colorscheme dracula

" Vundle
set nocompatible              " required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'

" Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin)
Plugin 'tpope/vim-fugitive'
"Plugin 'christoomey/vim-conflicted'
Plugin 'scrooloose/nerdtree'
Plugin 'Xuyuanp/nerdtree-git-plugin'
Bundle 'jistr/vim-nerdtree-tabs'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'vim-scripts/indentpython.vim'
Plugin 'raimondi/delimitmate'
"Plugin 'scrooloose/syntastic' "syntax checker
Plugin 'w0rp/ale' " async syntax checker
"Plugin 'nvie/vim-flake8'
Plugin 'majutsushi/tagbar'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'airblade/vim-gitgutter'
Plugin 'ryanoasis/vim-devicons'
Plugin 'ivalkeen/vim-ctrlp-tjump'
"Plugin 'tiagofumo/vim-nerdtree-syntax-highlight'
Plugin 'fisadev/vim-isort'
Plugin 'junegunn/fzf.vim'
"Plugin 'valloric/youcompleteme'
Plugin 'ervandew/supertab'
Plugin 'davidhalter/jedi-vim'
Plugin 'shougo/deoplete.nvim'
Plugin 'zchee/deoplete-jedi'
Plugin 'mustache/vim-mustache-handlebars'
Plugin 'xolox/vim-misc'
Plugin 'xolox/vim-session'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required

" Powerline
set rtp+=/usr/share/powerline/bindings/vim/
" Always show statusline
set laststatus=2

" vim-airline
"let g:airline_theme='hybridline'
let g:airline_theme='dracula'
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#branch#displayed_head_limit = 10

" pretty code
let python_highlight_all=1
syntax on

" YouCompleteMe
"let g:ycm_python_binary_path = '/usr/bin/python3'
let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file
let g:ycm_use_ultisnips_completer = 0 " Default 1, just ensure
let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword
let g:ycm_complete_in_comments = 1 " Completion in comments
let g:ycm_complete_in_strings = 1 " Completion in string

" NerdTREE
map <C-n> :NERDTreeToggle<CR>
autocmd vimenter * NERDTree | wincmd l " open NerdTree when entering vim, then focus right window
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
let g:nerdtree_tabs_open_on_console_startup=0
let g:nerdtree_tabs_open_on_new_tab=0

let NERDTreeMinimalUI=1
let NERDTreeDirArrows=0
let NERDTreeIgnore=['\.pyc$', '\~$', '^__pycache__$'] "ignore files in NERDTree
let g:NERDTreeWinSize = 25
" find current file in NERDTree by pressing ALT+V (√ in osx)
nnoremap √ :NERDTreeFind<CR>
let g:WebDevIconsNerdTreeAfterGlyphPadding = ''
let g:webdevicons_conceal_nerdtree_brackets = 1
let g:WebDevIconsNerdTreeGitPluginForceVAlign = 0
let g:WebDevIconsUnicodeGlyphDoubleWidth = 0

" NERDTree highlight
let g:NERDTreeFileExtensionHighlightFullName = 1
let g:NERDTreeExactMatchHighlightFullName = 1
let g:NERDTreePatternMatchHighlightFullName = 1
" uncommon file extensions highlightling:
let g:NERDTreeLimitedSyntax = 1
" uncomment these 3 lines to disable completely:
" let g:NERDTreeDisableFileExtensionHighlight = 1
" let g:NERDTreeDisableExactMatchHighlight = 1
" let g:NERDTreeDisablePatternMatchHighlight = 1

" Tagbar
nmap <C-m> :TagbarToggle<CR>

" Filetype autocmd
au FileType *.py 
    \ setlocal tabstop=4 softtabstop=4 shiftwidth=4 textwidth=119 expandtab autoindent fileformat=unix
au FileType *.js, *.html, *.css 
    \ setlocal tabstop=2 
    \| setlocal softtabstop=2 
    \| setlocal shiftwidth=2
au FileType *.hbs 
    \ setlocal tabstop=2 
    \| setlocal softtabstop=2 
    \| setlocal shiftwidth=2 
    \| setlocal ft=smarty

" Paste Toggle
" nmap <C-p> :se paste!<CR>

" CtrlP Search
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.pyc
" Ignore some folders and files for CtrlP indexing
let g:ctrlp_custom_ignore = {
  \ 'dir':  '\.git$\|\.yardoc\|public$|log\|tmp$',
  \ 'file': '\.so$\|\.dat$|\.DS_Store$'
  \ }
" Use ag for ctrlp searching
let g:ctrlp_user_command = 'ag %s -i --nocolor --nogroup --hidden
      \ --ignore .git
      \ --ignore .svn
      \ --ignore .hg
      \ --ignore .DS_Store
      \ --ignore "**/*.pyc"
      \ -g ""'

" CtrlP Tag Jump
" (π is ALT+P in osx)
nnoremap π :CtrlPtjump<CR>
vnoremap π :CtrlPtjumpVisual<CR>
let g:ctrlp_tjump_only_silent = 0

" Go to last active tab
au TabLeave * let g:lasttab = tabpagenr()
nnoremap <silent> <c-t> :exe "tabn ".g:lasttab<cr>
vnoremap <silent> <c-t> :exe "tabn ".g:lasttab<cr>
" Move between tabs with ALT-J (¶) and ALT-K (§) 
nnoremap ¶ :tabprevious<CR>
nnoremap § :tabnext<CR>
" ALT-T creates a new empty tab
nnoremap † :tabnew<CR>
" NeoVim only: Alt-arrows to move between tabs
nnoremap <A-Left> :tabprevious<CR>
nnoremap <A-Right> :tabnext<CR>

" CTags
set tags=~/work/shippo/.tags

" vimpy import resolver
let g:vimpy_prompt_resolve = 1
let g:vimpy_remove_unused = 1

" FZF fuzzy search for vim
set rtp+=/usr/local/opt/fzf
let g:fzf_layout = { 'down': '~50%' }
" Ctrl-K brings up file search (fzf)
nnoremap <C-K> :Files<CR>
" Ctrl-L brings up text search (uses ag)
nnoremap <C-L> :Ag<CR>
" Ctrl-F brings up current word text search (using ag)
nnoremap <C-F> :Ag <C-R><C-W><CR>
" preview window (press <?> to toggle)
command! -bang -nargs=* Ag
  \ call fzf#vim#ag(<q-args>,
  \                 <bang>0 ? fzf#vim#with_preview('up:60%')
  \                         : fzf#vim#with_preview('right:50%:hidden', '?'),
  \                 <bang>0)

"setglobal complete-=i
"set include=^\\s*#\\s*include\ \\(<boost/\\)\\@!

" Jedi-Vim
let g:jedi#show_call_signatures = "0"
"let g:jedi#completions_enabled = 0 
autocmd FileType python call jedi#configure_call_signatures()
" Alt-o or \d opens goToDefinition in a new tab
nnoremap <buffer>ø :tab split<CR> :call jedi#goto()<CR>
nnoremap <buffer><leader>d :tab split<CR> :call jedi#goto()<CR>
let g:jedi#force_py_version = 3

" Ale
let g:airline#extensions#ale#enabled = 1
let g:ale_sign_error = ''
let g:ale_sign_warning = ''
highlight ALEErrorSign guifg=#CC3333 ctermbg=160
highlight ALEWarningSign guifg=#FF9900 ctermbg=136
let g:ale_echo_msg_error_str = ''
let g:ale_echo_msg_warning_str = ''
let g:ale_echo_msg_format = '%severity% [%linter%] %s'
"highlight AleWarning guifg=#FF9900 gui=bold,underline
"highlight AleWarningLine guibg=NONE gui=italic
"highlight AleError guifg=#FF3333 gui=bold,underline
"highlight AleErrorLine guibg=NONE gui=italic
let g:ale_lint_delay = 1000 " 1 sec delay to run linter after text is changed
let g:ale_completion_enabled = 1

" Syntastic
let g:syntastic_python_checkers = ['pylint', 'flake8']
let g:syntastic_python_pylint_post_args="--max-line-length=120 --disable=C0111"

" Deoplete
let g:deoplete#enable_at_startup = 1

" SuperTab
let g:SuperTabDefaultCompletionType = "<c-n>"

" Fugitive
set diffopt+=vertical

" Do not Load rope plugin (should make jedi-vim faster)
let g:pymode_rope = 0

" highlight non-ascii
syntax match nonascii "[^\x00-\x7F]"
highlight nonascii guibg=Red ctermbg=2

" set yank to osx's clipboard
set clipboard=unnamed

" use xmllint on Visual Selection by calling :XmlLint (remove '<,'> from command line first)
command XmlLint '<,'>!xmllint --format -

" True colors for NVIM
if has('nvim') || has('termguicolors')
  set termguicolors
endif

" remove character from VertSplit column
:set fillchars+=vert:\ 

" GitGutter
let g:gitgutter_sign_added = '' "    
let g:gitgutter_sign_modified = '' "      
let g:gitgutter_sign_removed = '' "    
let g:gitgutter_sign_removed_first_line = ''
let g:gitgutter_sign_modified_removed = ''

" Highlight all occurrences of word under cursor 
autocmd CursorMoved * exe exists("HlUnderCursor")?HlUnderCursor?printf('match Pmenu /\V\<%s\>/', escape(expand('<cword>'), '/\')):'match none':""
let HlUnderCursor=1 " toggle this to 0 to disable 

" Session
let g:session_autoload = 'no'
let g:session_autosave = 'no'

CLICK TO VIEW

x