Created
May 8, 2021 20:18
-
-
Save eebmagic/e1284a0f1ae8379f9385404acdea16b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set tabstop=4 shiftwidth=4 expandtab | |
syntax on | |
nnoremap ; : | |
" Use tab key for indenting visual blocks | |
vnoremap <Tab> >gv | |
vnoremap <S-Tab> <gv | |
" duplicate highlighted selection under itself | |
vmap <C-p> y'>p | |
" Swap word under cursor with next word | |
nnoremap gw "_yiw:s/\(\%#\w\+\)\(\_W\+\)\(\w\+\)/\3\2\1/<CR><C-o><C-l> | |
" Add parens around remainder of line | |
nnoremap cp d$i ()<ESC>hp | |
set number relativenumber | |
set ruler | |
set splitright | |
set splitbelow | |
" Shows the last command key that was typed | |
set showcmd | |
set clipboard=unnamed | |
" Swap cursor for insert/other modes | |
let &t_SI.="\033[0 q" " start insert mode | |
let &t_EI.="\033[1 q" " end insert mode | |
" optional reset cursor on start and leave | |
augroup myCmds | |
au! | |
" flips through insert modes to triger cursor swap defined above | |
autocmd VimEnter * :normal :startinsert :stopinsert | |
autocmd VimLeave * silent !echo -ne "\033[0 q" | |
augroup END | |
" Kite settings | |
let g:kite_tab_complete=1 | |
" Remaps to make numpad work in mac terminal | |
:inoremap <Esc>Oq 1 | |
:inoremap <Esc>Or 2 | |
:inoremap <Esc>Os 3 | |
:inoremap <Esc>Ot 4 | |
:inoremap <Esc>Ou 5 | |
:inoremap <Esc>Ov 6 | |
:inoremap <Esc>Ow 7 | |
:inoremap <Esc>Ox 8 | |
:inoremap <Esc>Oy 9 | |
:inoremap <Esc>Op 0 | |
:inoremap <Esc>On . | |
:inoremap <Esc>OQ / | |
:inoremap <Esc>OR * | |
:inoremap <Esc>Ol + | |
:inoremap <Esc>OS - | |
:inoremap <Esc>OM <Enter> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment