• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisão5b3593364c3368d5087afaea1763119f844c7d1b (tree)
Hora2023-01-12 19:10:38
Autorbadcoff33 <none@none>
Commiterbadcoff33

Mensagem de Log

lots of remapping

Mudança Sumário

Diff

--- a/vimrc
+++ b/vimrc
@@ -120,9 +120,7 @@ command! ShowChanges vert new | set bt=nofile | r ++edit # | 0d_ | diffthis | wi
120120 " Switching modes
121121 inoremap <Ins> <Esc>
122122 inoremap <k0> <Esc>
123-inoremap <C-Space> <Esc>
124-noremap! <A-Space> <Esc>:
125-xnoremap <A-Space> :
123+inoremap <A-Space> <Esc>
126124
127125 " Consistent cursor movement
128126 noremap! <A-Left> <Home>
@@ -130,14 +128,14 @@ noremap! <A-Right> <End>
130128 xnoremap <A-Left> 0
131129 xnoremap <A-Right> $
132130
133-" Use the minus key for something useful
134-nnoremap - :
135-
136131 " Replace current inner word with one key press
137132 nnoremap <BS> ciw
138-
133+" Delete word before cursor
134+inoremap <A-BS> <C-w>
139135 " Yank more consistent to D and dd commands
140136 nnoremap Y y$
137+" Yank word under cursor
138+nnoremap <C-Insert> yiw
141139
142140 " Resizing window
143141 let GrowWin = { -> "3wincmd + | 5wincmd >" }
@@ -145,9 +143,6 @@ let ShrinkWin = { -> winnr("j")==winnr() ? "5wincmd <" : "3wincmd - | 5wincmd <"
145143 nnoremap <A-+> :<C-r>=GrowWin()<CR><CR>
146144 nnoremap <A--> :<C-r>=ShrinkWin()<CR><CR>
147145
148-" Yank word under cursor
149-nnoremap <C-Insert> yiw
150-
151146 " increment/decrement numbers blockwise
152147 vnoremap <C-x> <C-x>gv
153148 vnoremap <C-a> <C-a>gv
@@ -170,13 +165,10 @@ vnoremap <A-e> :move '<-2<CR>==gv=gv
170165 nnoremap <A-o> :bprevious<CR>
171166 nnoremap <A-i> :bnext<CR>
172167
173-nnoremap <silent> + <cmd>FF<CR>
174-nnoremap <silent> - <cmd>FR<CR>
175-
176168 " command line abbreviations
177169 let FilePath = { -> expand("%:h") == "" ? "" : expand("%:h") .. g:slash }
178170 cnoremap <expr> <A-.> (FilePath() == ".") ? "." : FilePath()
179-cnoremap <expr> <A-,> $USERPROFILE .. g:slash .. 'vimfiles' .. g:slash
171+cnoremap <expr> <A-,> $HOME .. g:slash .. 'vimfiles' .. g:slash
180172 cnoreabbrev <expr> vimgrep (getcmdtype() ==# ':' && getcmdline() =~# '^vimgrep') ? 'silent vimgrep' : 'vimgrep'
181173 cnoreabbrev <expr> grep (getcmdtype() ==# ':' && getcmdline() =~# '^grep') ? 'silent grep' : 'grep'
182174 cnoreabbrev <expr> make (getcmdtype() ==# ':' && getcmdline() =~# '^make') ? 'silent make' : 'make'
@@ -248,16 +240,14 @@ nnoremap <Leader>s :%s/<C-r><C-w>//gI<Left><Left><Left>
248240 vnoremap <Leader>s :s///gI<Left><Left><Left><Left>
249241
250242 " commands
251-nnoremap <Leader>e :edit<Space>
252243 nnoremap <Leader>, :edit <C-r>=$HOME .. g:slash .. 'vimfiles' .. g:slash<CR>
253244 nnoremap <Leader>. :edit <C-r>=(FilePath() == ".") ? "." : FilePath()<CR>
245+nnoremap <Leader>t <cmd>tab split<CR>
246+nnoremap <Leader>e :edit<Space>
254247 nnoremap <Leader>f :find *
255248 nnoremap <Leader>b :buffer<Space>
256-nnoremap <Leader>t :tjump /
257-nnoremap <Leader>x :Lexplore<Space>
258-nnoremap <Leader><Tab> <cmd>tabnew<CR>
259249
260-" quickfix
250+" Toggle the quickfix window
261251 function! s:ToggleQuickfix()
262252 let is_open = v:false
263253 windo if &buftype== "quickfix" | let is_open = v:true | endif
@@ -279,13 +269,12 @@ function! s:ToggleQuickfix()
279269 endif
280270 endif
281271 endfunction
282-nnoremap @ <cmd>call <SID>ToggleQuickfix()<CR>
283-nnoremap <Leader>g <cmd>cfirst<CR>
284-nnoremap <Leader>G <cmd>clast<CR>
272+nnoremap <A-Space> <cmd>call <SID>ToggleQuickfix()<CR>
273+nnoremap <A-g> <cmd>clast<CR>
285274
286275 let g:ft2glob = { 'c':'*.[ch]$', 'vim':'*.vim', 'py':'*.py$', 'cmake':'*cmake*' }
287276 let LsFilter = { ft -> has_key(g:ft2glob, ft) ? g:ft2glob[ft] : '*.*'}
288-nnoremap <expr> <Leader>v ':silent vimgrep /'..expand("<cword>")..'/ '..expand("%:h")..g:slash..LsFilter(&ft)
277+nnoremap <expr> <Leader>g ':silent vimgrep /'..expand("<cword>")..'/ '..expand("%:h")..g:slash..LsFilter(&ft)
289278
290279 command! -nargs=0 IC :set ignorecase nosmartcase
291280 command! -nargs=0 CS :set noignorecase nosmartcase