Skip to content

Instantly share code, notes, and snippets.

@washingweb
Last active October 28, 2022 13:27
Show Gist options
  • Save washingweb/6a60234702bd652e294950e8259edf0e to your computer and use it in GitHub Desktop.
Save washingweb/6a60234702bd652e294950e8259edf0e to your computer and use it in GitHub Desktop.
vim
filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
" On pressing tab, insert 4 spaces
set expandtab
" show line number
set nu
" enable mouse
set ttymouse=xterm2
set mouse=a
" edit mode underline
au InsertEnter * set cursorline
au InsertLeave * set nocursorline
imap jj <Esc>
:autocmd InsertEnter,InsertLeave * set cul!
:set number
{
"vim.insertModeKeyBindings": [
{
"before": ["f", "f"],
"after": ["<esc>"]
},
{
"before": ["j", "j"],
"after": ["<esc>"]
},
{
"before": ["<C-l>"],
"after": ["<C-o>", "l"]
},
{
"before": ["<C-a>"],
"after": ["<C-o>", "^"]
},
{
"before": ["<C-e>"],
"after": ["<C-o>", "$"]
}
],
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["<C-j>"],
"after": ["j", "<C-e>"]
},
{
"before": ["<C-k>"],
"after": ["k", "<C-y>"]
}
]
}
@washingweb
Copy link
Author

{
    "vim.insertModeKeyBindings": [
        {
            "before": ["j", "j"],
            "after": ["<esc>"]
        },
        {
            "before": ["<C-l>"],
            "after": ["<C-o>", "l"]
        },
        {
            "before": ["<C-a>"],
            "after": ["<C-o>", "^"]
        },
        {
            "before": ["<C-e>"],
            "after": ["<C-o>", "$"]
        }
    ],
    "vim.normalModeKeyBindingsNonRecursive": [
        {
            "before": ["<C-j>"],
            "after": ["5", "j"]
        },
        {
            "before": ["<C-k>"],
            "after": ["5", "k"]
        }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment