aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2023-04-19 20:27:35 +0800
committerGuangxiong Lin <[email protected]>2023-04-19 20:27:35 +0800
commit621f769d6a0892d8d93014af7d7f6b54d22947c1 (patch)
tree946974be1b57b4444da92b7f82658733e7aa0cc8
parent97e91b68a00b9c2f4c76dca951bfaa3fbbf3547b (diff)
downloaddotfiles-621f769d6a0892d8d93014af7d7f6b54d22947c1.tar.gz
dotfiles-621f769d6a0892d8d93014af7d7f6b54d22947c1.tar.bz2
dotfiles-621f769d6a0892d8d93014af7d7f6b54d22947c1.zip
Remove buggy customized keybind
-rw-r--r--.vim/after/plugin/keybindings.vim55
1 files changed, 0 insertions, 55 deletions
diff --git a/.vim/after/plugin/keybindings.vim b/.vim/after/plugin/keybindings.vim
deleted file mode 100644
index b76eb27..0000000
--- a/.vim/after/plugin/keybindings.vim
+++ /dev/null
@@ -1,55 +0,0 @@
-imap <C-b> <Left>
-imap <C-f> <Right>
-imap <C-n> <Down>
-imap <C-p> <Up>
-imap <C-a> <C-o>:call <SID>home()<CR>
-imap <C-e> <End>
-imap <C-d> <Del>
-imap <C-h> <BS>
-imap <C-k> <C-r>=<SID>kill_line()<CR>
-
-cmap <C-p> <Up>
-cmap <C-n> <Down>
-cmap <C-b> <Left>
-cmap <C-f> <Right>
-cmap <C-a> <Home>
-cmap <C-e> <End>
-cnoremap <C-d> <Del>
-cnoremap <C-h> <BS>
-cnoremap <C-k> <C-f>D<C-c><C-c>:<Up>
-
-function! s:home()
- let start_col = col('.')
- normal! ^
- if col('.') == start_col
- normal! 0
- endif
- return ''
-endfunction
-
-function! s:kill_line()
- let [text_before_cursor, text_after_cursor] = s:split_line_text_at_cursor()
- if len(text_after_cursor) == 0
- normal! J
- else
- call setline(line('.'), text_before_cursor)
- endif
- return ''
-endfunction
-
-function! s:split_line_text_at_cursor()
- let line_text = getline(line('.'))
- let text_after_cursor = line_text[col('.')-1 :]
- let text_before_cursor = (col('.') > 1) ? line_text[: col('.')-2] : ''
- return [text_before_cursor, text_after_cursor]
-endfunction
-
-function! s:toggle_quickfix()
- if empty(filter(getwininfo(), 'v:val.quickfix'))
- copen
- else
- cclose
- endif
-endfunction
-
-nnoremap <silent> <leader>c :call s:toggle_quickfix()<cr>