-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinit.vim
More file actions
555 lines (471 loc) · 19.5 KB
/
Copy pathinit.vim
File metadata and controls
555 lines (471 loc) · 19.5 KB
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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
call plug#begin('~/.local/share/nvim/plugged')
" Core plugins
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'christoomey/vim-tmux-navigator'
Plug 'benmills/vimux'
Plug 'neoclide/coc-neco'
Plug 'neoclide/coc.nvim', { 'branch': 'release' }
Plug 'szw/vim-maximizer'
Plug 'easymotion/vim-easymotion'
Plug 'matze/vim-move'
Plug 'danro/rename.vim'
Plug 'mhinz/vim-startify'
Plug 'itchyny/lightline.vim'
" Plug 'ryanoasis/vim-devicons'
Plug 'Yggdroot/indentLine'
Plug 'romgrk/doom-one.vim'
" Plug 'SirVer/ultisnips'
Plug 'Shougo/neosnippet'
Plug 'Shougo/neosnippet-snippets'
Plug 'honza/vim-snippets'
Plug 'tpope/vim-surround' " Easily change Surround characters
Plug 'kana/vim-textobj-user'
Plug 'kana/vim-textobj-indent'
Plug 'kana/vim-textobj-line'
Plug 'kana/vim-textobj-entire'
Plug 'gaving/vim-textobj-argument'
Plug 'coderifous/textobj-word-column.vim'
Plug 'ntpeters/vim-better-whitespace'
Plug 'alvan/vim-closetag'
Plug 'jiangmiao/auto-pairs'
Plug 'tpope/vim-endwise'
Plug 'tpope/vim-commentary'
Plug 'junegunn/vim-easy-align'
Plug 'dense-analysis/ale'
Plug 'brooth/far.vim'
Plug 'janko-m/vim-test'
" Plug 'xolox/vim-session'
Plug 'xolox/vim-misc'
"----------------------------------------------
" VCS git
"----------------------------------------------
Plug 'tpope/vim-fugitive' " Easily manipulate Git(hub)
Plug 'tpope/vim-rhubarb'
Plug 'sheerun/vim-polyglot'
Plug 'tpope/vim-projectionist'
" Plug 'liuchengxu/vim-clap', { 'do': ':Clap install-binary' }
"----------------------------------------------
" Language: Ruby
"----------------------------------------------
" Plug 'vim-ruby/vim-ruby'
" Plug 'tpope/vim-rails'
" Plug 'hackhowtofaq/vim-solargraph'
"----------------------------------------------
" Language: JavaScript
"----------------------------------------------
" Plug 'pangloss/vim-javascript', { 'for': 'javascript' } " vim-jsx
" Plug 'mxw/vim-jsx', { 'for': 'javascript' }
" Plug 'ternjs/tern_for_vim', { 'for': 'javascript', 'do': 'npm install' }
" Plug 'epilande/vim-es2015-snippets', { 'for': 'javascript' } " ES2015 code snippets (Optional)
" Plug 'epilande/vim-react-snippets', { 'for': 'javascript' } " React code snippets
Plug 'prettier/vim-prettier', { 'do': 'yarn install' }
Plug 'mattn/emmet-vim', { 'for': ['html', 'erb', 'javascript'] } " emmet-vim
Plug 'editorconfig/editorconfig-vim'
" Plug 'kchmck/vim-coffee-script'
call plug#end()
"----------------------------------------------
" General settings
"----------------------------------------------
filetype plugin indent on
set nocompatible
set autoindent " take indent for new line from previous line
set smartindent " enable smart indentation
set autoread
set clipboard=unnamed
set expandtab " expands tabs to spaces
set softtabstop=2
set tabstop=2
set shiftwidth=2
set ignorecase
set smartcase
set encoding=UTF-8
set nowrap
syntax enable
let g:strip_whitespace_on_save = 1
set ttimeout
set ttimeoutlen=0
"----------------------------------------------
" Layer: Themes
"----------------------------------------------
" set background=dark
colorscheme doom-one
let g:doom_one_terminal_colors = v:true
if (has("nvim"))
"For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
endif
"For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
"Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
" < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
if (has("termguicolors"))
set termguicolors
endif
" Show status bar by default.
set laststatus=2
if !has('gui_running')
set t_Co=256
set t_ut=
endif
" " Set this. Airline will handle the rest.
" let g:airline_theme = 'luna'
" " Enable top tabline.
" let g:airline#extensions#tabline#enabled = 1
" " Disable showing tabs in the tabline. This will ensure that the buffers are
" " what is shown in the tabline at all times.
" let g:airline#extensions#tabline#show_tabs = 0
" " Show only file name in tabline
" let g:airline#extensions#tabline#fnamemod = ':t'
" " Show buffer index next to file name
" let g:airline#extensions#tabline#buffer_nr_show = 1
" " Enable powerline fonts.
" let g:airline_powerline_fonts = 1
" " Advanced separators (extra-powerline-symbols):
" let g:airline_left_sep = "\uE0B4"
" let g:airline_right_sep = "\uE0B6"
"----------------------------------------------
" Searching
"----------------------------------------------
set incsearch " move to match as you type the search query
set hlsearch " disable search result highlighting
if has('nvim')
set inccommand=split " enables interactive search and replace
endif
" Clear search highlights
nnoremap <Esc> :noh<CR><Esc>
" These mappings will make it so that going to the next one in a search will
" center on the line it's found in.
nnoremap n nzzzv
nnoremap N Nzzzv
"----------------------------------------------
" Navigation
"----------------------------------------------
" Disable arrow keys
" inoremap <Up> <nop>
" inoremap <Down> <nop>
" inoremap <Left> <nop>
" inoremap <Right> <nop>
" noremap <Up> <nop>
" noremap <Down> <nop>
" noremap <Left> <nop>
" noremap <Right> <nop>
"----------------------------------------------
" Plug 'kana/vim-textobj-entire'
"----------------------------------------------
call textobj#user#plugin('entire', {
\ '-': {
\ 'select-a': 'ag', 'select-a-function': 'textobj#entire#select_a',
\ 'select-i': 'ig', 'select-i-function': 'textobj#entire#select_i'
\ }
\ })
"----------------------------------------------
" Plug 'xolox/vim-session'
"----------------------------------------------
" let g:session_autoload = 'no'
" let g:session_autosave = 'no'
"----------------------------------------------
" Snippets
"----------------------------------------------
let g:neosnippet#enable_completed_snippet = 1
let g:neosnippet#enable_snipmate_compatibility = 1
" Plugin key-mappings.
" Note: It must be "imap" and "smap". It uses <Plug> mappings.
imap <C-e> <Plug>(neosnippet_expand_or_jump)
smap <C-e> <Plug>(neosnippet_expand_or_jump)
xmap <C-e> <Plug>(neosnippet_expand_target)
" cuperTab like snippets behavior.
" Note: It must be "imap" and "smap". It uses <Plug> mappings.
imap <expr><TAB>
\ pumvisible() ? "\<C-n>" :
\ neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
" For conceal markers.
if has('conceal')
set conceallevel=2 concealcursor=niv
endif
"----------------------------------------------
" Linter
"----------------------------------------------
" Enable completion where available.
let g:ale_completion_enabled = 1
" Set this variable to 1 to fix files when you save them.
let g:ale_lint_on_save = 1
let g:ale_fixers = {
\ 'javascript': ['prettier'],
\ 'json': ['jq'],
\ 'ruby': ['rubocop'],
\}
let g:ale_linters = {
\ 'javascript': ['eslint'],
\ 'json': ['jsonlint'],
\ 'ruby': ['rubocop'],
\}
let g:ale_lint_on_text_changed="never"
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'E'
let g:ale_echo_msg_warning_str = 'W'
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
let g:ale_set_highlights = 0
let g:ale_set_loclist = 0
let g:ale_set_quickfix = 1
highlight SignColumn guibg=255
"----------------------------------------------
" Plug 'Shougo/deoplete.nvim'
"----------------------------------------------
if has('nvim')
" Enable deoplete on startup
let g:deoplete#enable_at_startup = 1
endif
let g:python3_host_prog = "/usr/local/bin/python3"
let g:python2_host_prog = "/usr/local/bin/python2.7"
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
"----------------------------------------------
" Plug 'Yggdroot/indentLine'
"----------------------------------------------
let g:indentLine_enabled = 0
let g:indentLine_concealcursor = 'inc'
let g:indentLine_conceallevel = 2
"----------------------------------------------
" Plug 'pangloss/vim-javascript'
"----------------------------------------------
let g:javascript_plugin_flow = 1
"----------------------------------------------
" Plug 'mxw/vim-jsx'
"----------------------------------------------
let g:jsx_ext_required = 0
"----------------------------------------------
" Plug 'prettier/vim-prettier'
"----------------------------------------------
let g:prettier#autoformat = 0
autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.less,*.json,*.graphql,*.md,*.vue Prettier
"----------------------------------------------
" Plug 'christoomey/vim-tmux-navigator'
"----------------------------------------------
" tmux will send xterm-style keys when its xterm-keys option is on.
if &term =~ '^screen'
execute "set <xUp>=\e[1;*A"
execute "set <xDown>=\e[1;*B"
execute "set <xRight>=\e[1;*C"
execute "set <xLeft>=\e[1;*D"
endif
" Tmux vim integration
let g:tmux_navigator_no_mappings = 1
let g:tmux_navigator_save_on_switch = 1
" only works on mac osx - Move between splits with ctrl+h,j,k,l
" set shell=/bin/bash\ -i
"----------------------------------------------
" Plug 'itchyny/lightline.vim'
"----------------------------------------------
function! LinterStatus() abort
let l:counts = ale#statusline#Count(bufnr(''))
let l:all_errors = l:counts.error + l:counts.style_error
let l:all_non_errors = l:counts.total - l:all_errors
return l:counts.total == 0 ? '✓' : printf(
\ 'Linter %d🚸 %d⛔️',
\ all_non_errors,
\ all_errors
\)
endfunction
" \ 'colorscheme': 'doom-one',
let g:lightline = {
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'filename', 'modified', 'alestatus'] ]
\ },
\ 'component_function': {
\ 'alestatus': 'LinterStatus'
\ },
\ }
"----------------------------------------------
" Plug 'scrooloose/nerdtree'
"----------------------------------------------
let g:NERDTreeSyntaxDisableDefaultExtensions = 1
let g:NERDTreeDisableExactMatchHighlight = 1
let g:NERDTreeDisablePatternMatchHighlight = 1
let g:NERDTreeSyntaxEnabledExtensions = ['rb', 'js', 'html', 'haml', 'css', 'erb', 'jsx', 'scss']
let g:NERDTreeLimitedSyntax = 1
let g:NERDTreeHighlightCursorline = 0
"----------------------------------------------
" Plug 'mhinz/vim-startify'
"----------------------------------------------
let g:startify_change_to_vcs_root = 1
"----------------------------------------------
" Plug 'alvan/vim-closetag'
"----------------------------------------------
let g:closetag_filenames = "*.html,*.xhtml,*.phtml,*.erb,*.jsx,*.js"
let g:closetag_xhtml_filenames = '*.xhtml,*.jsx,*.erb,*.js'
let g:closetag_emptyTags_caseSensitive = 1
" Add > at current position without closing the current tag, default is ''
let g:closetag_close_shortcut = '<leader>>'
let g:AutoPairsFlyMode = 0
"----------------------------------------------
" Plug 'mattn/emmet-vim'
"----------------------------------------------
" let g:user_emet_expandabbr_key='<Tab>'
let g:user_emmet_settings = {
\ 'javascript.jsx' : {
\ 'extends' : 'jsx',
\ 'block_all_childless' : 1,
\ 'quote_char': "'",
\ },
\ 'html': {
\ 'block_all_childless' : 1,
\ 'quote_char': "'",
\ },
\}
" augroup Term
" autocmd!
" " Always start in terminal mode in term buffers
" autocmd TermOpen * startinsert
" autocmd BufEnter term://* startinsert
" autocmd BufLeave term://* stopinsert
" augroup END
" escape from terminal mode to normal mode
tnoremap jk <C-\><C-n>
"----------------------------------------------
" Plug 'janko-m/vim-test'
"----------------------------------------------
let g:test#strategy = 'vimux'
let g:test#preserve_screen = 1
let test#enabled_runners = ["ruby#rspec"]
let test#ruby#minitest#file_pattern = '_spec\.rb'
"----------------------------------------------
" Plug 'junegunn/fzf.vim'
"----------------------------------------------
" disable floating window
let g:fzf_layout = { 'down': '40%' }
"----------------------------------------------
" Plug 'junegunn/vim-easy-align'
"----------------------------------------------
let g:easy_align_delimiters = {
\ '"': { 'pattern': '\s"', 'delimiter_align': 'l' }
\ }
" Start interactive EasyAlign in visual mode (e.g. vipga)
xmap ga <Plug>(EasyAlign)
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
nmap ga <Plug>(EasyAlign)
"----------------------------------------------
" Space Mapping
"----------------------------------------------
let mapleader = ","
" Help Mapping
nnoremap <silent> <Space>hdb :Maps<CR>
nnoremap <silent> <Space>hdf :Helptags<CR> " Help > Describe > Tags Function
nnoremap <silent> <Space>qq :q<CR> " Quit Program
" Windows
nnoremap <silent> <C-h> :TmuxNavigateLeft<cr>
nnoremap <silent> <C-j> :TmuxNavigateDown<cr>
nnoremap <silent> <C-k> :TmuxNavigateUp<cr>
nnoremap <silent> <C-l> :TmuxNavigateRight<cr>
nnoremap <silent> <Space>! yy:let cliptext = getreg('*') \| :VimuxPromptCommand(cliptext)<CR><CR>
vnoremap <silent> <Space>! y:let cliptext = getreg('*') \| :VimuxPromptCommand(cliptext)<CR><CR>
nnoremap <silent> <Space>0 :NERDTreeFind<CR> " Tree > Select Window
nnoremap <silent> <Space>1 :exe 1 . 'wincmd w'<CR> " Window 1
nnoremap <silent> <Space>2 :exe 2 . 'wincmd w'<CR> " Window 2
nnoremap <silent> <Space>3 :exe 3 . 'wincmd w'<CR> " Window 3
nnoremap <silent> <Space>4 :exe 4 . 'wincmd w'<CR> " Window 4
nnoremap <silent> <Space>5 :exe 5 . 'wincmd w'<CR> " Window 5
nnoremap <silent> <Space>6 :exe 6 . 'wincmd w'<CR> " Window 6
nnoremap <silent> <Space>7 :exe 7 . 'wincmd w'<CR> " Window 7
nnoremap <silent> <Space>8 :exe 8 . 'wincmd w'<CR> " Window 8
nnoremap <silent> <Space>9 :exe 9 . 'wincmd w'<CR> " Window 9
nnoremap <silent> <Space>wv :wincmd v<CR> " Window Vertical
nnoremap <silent> <Space>ws :wincmd s<CR> " Window Split
nnoremap <silent> <Space>w= :wincmd =<CR> " Window Balance Area
nnoremap <silent> <Space>wl :wincmd l<CR> " Window Left
nnoremap <silent> <Space>wh :wincmd h<CR> " Window Right
nnoremap <silent> <Space>wj :wincmd j<CR> " Window Down
nnoremap <silent> <Space>wk :wincmd k<CR> " Window Up
nnoremap <silent> <Space>ww :wincmd w<CR> " Other Window
nnoremap <silent> <Space>wr :wincmd r<CR> " Rotate Window
nnoremap <silent> <Space>w<S-k> :wincmd <S-k><CR> " Move Window Very Top
nnoremap <silent> <Space>w<S-j> :wincmd <S-j><CR> " Move Window Very Bottom
nnoremap <silent> <Space>w<S-h> :wincmd <S-h><CR> " Move Window Far Right
nnoremap <silent> <Space>w<S-l> :wincmd <S-l><CR> " Move Window Far Left
nnoremap <silent> <Space>wc :close<CR> " Window Close
nnoremap <silent> <Space><BS> :close<CR> " Window Close
nnoremap <silent> <Space>wm :MaximizerToggle<CR> " Window Maximize
" Files
nnoremap <Space>fs :update<CR> " File > Save
nnoremap <silent> <Space>ft :NERDTreeToggle<CR> " File > Tree
nnoremap <silent> <Space>fT :NERDTreeFind<CR> " File > Tree > Find
nnoremap <silent> <Space>fed :e ~/.config/nvim/init.vim<CR> " File > Editor > Definition
nnoremap <silent> <Space>fez :e ~/.zshrc<CR> " File > Editor > ZSH
nnoremap <silent> <Space>fet :e ~/.tmux.conf<CR> " File > Editor > Tmux
nnoremap <Space>feR :source ~/.config/nvim/init.vim<CR> " File > Editor > Reload
nnoremap <silent> <Space>ff :Files %:p:h<CR>| " File > Find File in Current Directory
nnoremap <silent> <Space>fr :History<CR>| " File > Find File in History
nnoremap <Space>fR :Rename<Space>| " Rename File
nnoremap <Space>fc :saveas <C-R>=expand("%:p:h")<CR>/| " Copy File
nnoremap <silent> <Space>fyY :let @*=expand("%") \| echo @*<CR> " File > Copy Relative File Path
nnoremap <silent> <Space>fyy :let @*=expand("%:p") \| echo @*<CR> " File > Copy Full File Path
nnoremap <silent> <Space>fyd :let @*=expand("%:p:h") \| echo @*<CR> " File > Copy Directory Path
" Projects
nnoremap <silent> <Space>pf :FZF<CR>
nnoremap <silent> <Space>pa :A<CR>
nnoremap <silent> <Space>pg :Tags<CR>
nnoremap <silent> <C-p> :FZF<CR>
" Searching
nnoremap <silent> <Space>/ :Rg<CR>
nnoremap <silent> <Space>sp :Rg<CR>
nnoremap <silent> <Space>su :Rg<up><CR>
nnoremap <silent> <Space>ss :BLines<CR>
nnoremap <silent> <Space>* :Rg <C-R><C-W><CR>
nmap s <Plug>(easymotion-overwin-f)
map <silent> <Space>jj <Plug>(easymotion-s)
map <silent> <Space>jw <Plug>(easymotion-overwin-f)
" map <Space>jL <Plug>(easymotion-bd-jk)
nmap <Space>jl <Plug>(easymotion-overwin-line)
nnoremap <silent> <Space>ji :BTags<CR>
" nnoremap <silent> <Space>sh :call <SNR>62_Highlight("w") \| nohls<CR>
" nnoremap <silent> <Space>sc :call <SNR>62_Highlight("n")<CR>
" Buffers
nnoremap <silent> <Space>bb :Buffer<CR>| " List Buffers
nnoremap <silent> <Space>bd :bdelete<CR> " Delete Buffer
nnoremap <silent> <Space>bn :bnext<CR> " Next Buffer
nnoremap <silent> <Space>bp :bprevious<CR> " Previous Buffer
nnoremap <silent> <Space>bh :Startify<CR> " Home Buffer
nnoremap <silent> <Space><tab> <C-^> " Last Buffer
nnoremap <silent> <Space>bx :e /tmp/scratch<CR> " Scratch Buffer
" Errors
nnoremap <silent> ]e :ALENext<CR> " Next Error
nnoremap <silent> [e :ALEPrevious<CR> " Next Error
nnoremap <silent> <Space>ef :ALEFix<CR> " Fix Errors
" Git
nnoremap <silent> <Space>gb :Gblame<CR> " Git Blame
nnoremap <silent> <Space>gs :Gstatus<CR> " Git Status
nnoremap <silent> <Space>goo :Gbrowse<CR> " Git Browse
" Terminal
" nnoremap <silent> <Space>' :Ttoggle<CR> " Open/Close shell
" tnoremap <silent> <Space>' <C-\><C-n>:Ttoggle<CR> " Open/Close Shell
" Test
nnoremap <Leader>tb :TestFile<CR>:TmuxNavigateDown<CR> " Run test in Buffer
nnoremap <Leader>tt :TestNearest<CR>:TmuxNavigateDown<CR> " Run test at point
noremap <f5> :TestNearest<CR>:TmuxNavigateDown<CR> " Run test at point
" Register
nnoremap <silent> <Space>re :registers<CR>| " Registers
" Text
nmap <Space>xa: <Plug>(EasyAlign)ip:<CR>| " Text > Align > :
nmap <Space>xa= <Plug>(EasyAlign)ip=<CR>| " Text > Align > =
nmap <Space>xa" <Plug>(EasyAlign)ip"<CR>| " Text > Align > "
" Toggle
nnoremap <silent> <Space>ti :IndentLinesToggle<CR>
nnoremap <silent> <Space>tl :set nu! rnu!<CR>
" Global
nmap gy yygccp " Copy and Comment Lines
nmap <silent> <Space>cl gcc " Comment Lines
vmap <silent> <Space>cl gcc " Comment Lines
vmap <silent> <S-k> <Plug>MoveBlockUp " Move Block Up
vmap <silent> <S-j> <Plug>MoveBlockDown " Move Block Down
nnoremap <silent> <M-b> :Buffer<CR>| " List Buffers
nnoremap <M-s> :update<CR> " File > Save
nnoremap <silent> <M-w> :close<CR> " Close window
nnoremap <silent> gd :tag <C-R><C-W><CR>
autocmd FileType javascript nmap <silent> gd <Plug>(coc-definition)
autocmd FileType javascript nmap <silent> gr <Plug>(coc-references)
autocmd FileType javascript nmap <silent> [g <Plug>(coc-diagnostic-prev)
autocmd FileType javascript nmap <silent> ]g <Plug>(coc-diagnostic-next)