From 6e0585a790b4786f2be1d327812fa46450effa2d Mon Sep 17 00:00:00 2001 From: Artem Sheremet Date: Thu, 24 Dec 2015 23:24:25 +0100 Subject: [PATCH] Disable shortcuts that I no longer use Some of them are confusing (such as ^W, which is used to type window commands). Some are not used anymore because F1-F12 keys are either not present (Chromebook) or usefully bound to other actions (backlight, sound control etc). Others are not compatible with some platforms and it's so damn hard to properly disable system shortcuts, such as Ctrl+Up in Macbook. Using vim commands looks prettier with every platform switch :) --- .vimrc | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/.vimrc b/.vimrc index 766faa5..e6092d6 100644 --- a/.vimrc +++ b/.vimrc @@ -135,25 +135,25 @@ fu! Amap(key, cmd, ...) exe "imap <" . a:key . "> <" . a:key . ">" endf -call Amap("C-t", "tabnew") -call Amap("C-b", ":ls:b", 0) -call Amap("C-w", "close") +"call Amap("C-t", "tabnew") +"call Amap("C-b", ":ls:b", 0) +"call Amap("C-w", "close") -call Amap("F2", "update") -call Amap("F3", "NERDTreeToggle") -call Amap("F7", "TagbarToggle") +"call Amap("F2", "update") +"call Amap("F3", "NERDTreeToggle") +"call Amap("F7", "TagbarToggle") "setl noai nocin nosi inde= formatoptions-=c formatoptions-=r formatoptions-=o nonumber call Amap("F8", "setl paste! number! list! NoShowMarks GitGutterToggle") " Navigate by tabs with Shift+Left/Right -call Amap("S-Left", "tabprev") -call Amap("S-Right", "tabnext") +"call Amap("S-Left", "tabprev") +"call Amap("S-Right", "tabnext") " Navigate by windows with Ctrl+direction -call Amap("C-Left", "wincmd h") -call Amap("C-Down", "wincmd j") -call Amap("C-Up", "wincmd k") -call Amap("C-Right", "wincmd l") +"call Amap("C-Left", "wincmd h") +"call Amap("C-Down", "wincmd j") +"call Amap("C-Up", "wincmd k") +"call Amap("C-Right", "wincmd l") " Resize windows with Alt+direction call Amap("M-Left", "vertical resize -1") @@ -162,14 +162,10 @@ call Amap("M-Up", "resize -1") call Amap("M-Right", "vertical resize +1") " Move windows with Ctrl+Shift+direction -call Amap("C-S-Left", "wincmd H") -call Amap("C-S-Down", "wincmd J") -call Amap("C-S-Up", "wincmd K") -call Amap("C-S-Right", "wincmd L") - -" Split windows with Ctrl+Alt+Down/Right -call Amap("C-M-Down", "split") -call Amap("C-M-Right", "vsplit") +"call Amap("C-S-Left", "wincmd H") +"call Amap("C-S-Down", "wincmd J") +"call Amap("C-S-Up", "wincmd K") +"call Amap("C-S-Right", "wincmd L") " Backspace navigates 'Back' nmap