-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeymaps.vim
108 lines (88 loc) · 4.01 KB
/
keymaps.vim
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
let mapleader = ','
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Fast editing and reloading of vimrc configs
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
map <leader>e :e! ~/.config/nvim/init.vim<cr>
autocmd! bufwritepost ~/.config/nvim/init.vim source ~/.config/nvim/init.vim
" Kill the buffer without closing the window
map <Leader>kl :BD<cr>
" Fix My JS
noremap <Leader><Leader>e :Fixmyjs<CR>
" Set Emmet trigger keys
let g:user_emmet_leader_key=","
" Edit my config
noremap <Leader>cfg :e ~/.vim_runtime/my_configs.vim<CR>
" NERDTree Reload
nmap <Leader>rn :NERDTreeFocus<cr>R<c-w><c-p>
" Press * to search and leader-r for replacing
nnoremap <Leader>r :%s///g<Left><Left>
nnoremap <Leader>rc :%s///gc<Left><Left><Left>
vnoremap <C-c> "+y
map <C-p> "+p
map <j> :noh
" Disable highlight when <leader><cr> is pressed
map <silent> <leader><cr> :noh<cr>
" Smart way to move between windows
nnoremap <C-j> <C-W>j
nnoremap <C-k> <C-W>k
nnoremap <C-h> <C-W>h
nnoremap <C-l> <C-W>l
" Close all the buffers
map <leader>ba :bufdo bd<cr>
map <leader>l :bnext<cr>
map <leader>h :bprevious<cr>
" Useful mappings for managing tabs
map <leader>tn :tabnew<cr>
map <leader>to :tabonly<cr>
map <leader>tc :tabclose<cr>
map <leader>tm :tabmove
map <leader>t<leader> :tabnext
" Enable mouse support
set mouse=a
set clipboard=unnamedplus
" set autochdir
let g:gist_use_password_in_gitconfig = 1
""""""""""""""""""""""""""""""""
" Fix that pesky capital error when saving
""""""""""""""""""""""""""""""""
command WQ wq
command Wq wq
command! W w
command Q q
command Qa qa
" Find files using Telescope command-line sugar.
nnoremap <leader>ff <cmd>Telescope find_files<cr>
nnoremap <leader>j <cmd>Telescope find_files<cr>
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
nnoremap <leader>fb <cmd>Telescope buffers<cr>
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
imap <silent><script><expr> <C-J> copilot#Accept("\<CR>")
let g:copilot_no_tab_map = v:true
let g:dashboard_default_executive ='telescope'
let g:dashboard_custom_header = [
\' ██╗ ██╗ ██████╗ ██╗ ██╗ ███████╗██████╗ ',
\' ██║ ██║██╔═══██╗██║ ██║ ██╔════╝██╔══██╗',
\' ███████║██║ ██║██║ ██║ █████╗ ██████╔╝',
\' ██╔══██║██║ ██║██║ ██║ ██╔══╝ ██╔══██╗',
\' ██║ ██║╚██████╔╝███████╗███████╗███████╗██║ ██║',
\' ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝╚══════╝╚═╝ ╚═╝',
\ ]
" let g:dashboard_custom_header = [
" \' .-:+osyyyyys+:::. ',
" \' `-/oydmmhysoydNMNdhysssshNh- ',
" \' :smNho/-` -odNho:` .mM: ',
" \' `dMsoymd`-ohNdo: .:`/Md ',
" \' hMomMhshNds::ys+/:-:: -sMd..MM. ',
" \' mM//yyo:` ymddmmmmmdh//ohNds- NMmmmdyo:` ',
" \' -+yNM/ .:/+ssyyyso/-` yMs .:+yNms. ',
" \' `/yNds/dM+ -MN: ./- -hMy` ',
" \' .yMd+` sMy `:+mMmoyMMM+ yMs ',
" \' sMd- +Md -+yhMMMMMNMMMNy: `dM+ ',
" \' oMh -dy- ` .smMMMNdmy- ` .sNm/ ',
" \' sMy ommhysoo+++oosyhdmMMMmo. -odNy: ',
" \' `hMy. .-:///++/oNMMMMms: ./ohNdo: ',
" \' -yNds/. `-:` `-/oydNdy+- ',
" \' -+ydNdhso+/:---------::/+osyhdmmdys+:. ',
" \' `-:/+osyyyyyyyyssoo+/:-.`',
" \ ]
let g:dashboard_custom_footer = ["I DON'T KNOW WHAT I'M DOING..."]