Skip to content

Commit

Permalink
Only jj escape insert mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ngerritsen committed Mar 24, 2022
1 parent 124b5c0 commit 91da8c0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions .config/nvim/lua/user/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ vim.g.mapleader = " "
vim.g.maplocalleader = " "

-- Better escape
map("v", "jj", "<Esc>", opts)
map("x", "jj", "<Esc>", opts)
map("i", "jj", "<Esc>", opts)

-- Configuration
Expand Down Expand Up @@ -56,7 +54,7 @@ map("n", "<C-w>]", "<cmd>vertical resize +8<CR>", opts)

-- File explorer
map("n", "<C-f>", ":NvimTreeFindFile<CR>", opts)
map("n", "<Leader>f", ":NvimTreeClose<CR>", opts)
map("n", "<Leader>f", ":NvimTreeToggle<CR>", opts)

-- Preserve visual paste
map("v", "p", '"_dP', opts)
Expand Down
2 changes: 0 additions & 2 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ let mapleader = "\<space>"

" Better Escape
inoremap <silent> jj <Esc>
cnoremap <silent> jj <Esc>
vnoremap <silent> jj <Esc>
" Configuration
nnoremap <Leader>se :e $MYVIMRC<CR>
Expand Down

0 comments on commit 91da8c0

Please sign in to comment.