From 621f769d6a0892d8d93014af7d7f6b54d22947c1 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Wed, 19 Apr 2023 20:27:35 +0800 Subject: Remove buggy customized keybind --- .vim/after/plugin/keybindings.vim | 55 --------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 .vim/after/plugin/keybindings.vim 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 -imap -imap -imap -imap :call home() -imap -imap -imap -imap =kill_line() - -cmap -cmap -cmap -cmap -cmap -cmap -cnoremap -cnoremap -cnoremap D: - -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 c :call s:toggle_quickfix() -- cgit v1.2.3