Last active
January 9, 2020 13:24
-
-
Save meowmeowxw/d0850154dba5dc26b4a43cee6432baee to your computer and use it in GitHub Desktop.
Minimal vim
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
"Created by @meowmeowxw | |
"Vim behaviour | |
set background=dark | |
colorscheme evening | |
"set termguicolors | |
set hls! | |
set laststatus=2 | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set noexpandtab | |
set number | |
set splitbelow | |
set splitright | |
set noshowmode | |
set cursorline | |
set colorcolumn=80 | |
" | |
" Custom Shortcuts | |
map <F6> :tabp<CR> | |
map <F7> :tabn<CR> | |
map <C-K> :5winc +<CR> | |
map <C-J> :5winc -<CR> | |
map <C-H> :5winc ><CR> | |
map <C-L> :5winc <<CR> | |
" Nvim only | |
map <C-T> :vsplit term://zsh<CR> | |
map D d$ | |
map Y y$ | |
nnoremap <Leader>c :set cursorline!<CR> | |
nnoremap <Leader>r :g/^\s*$/d<CR> | |
tnoremap <Esc> <C-\><C-n> | |
" | |
" automatic close bracket } | |
inoremap { {}<left> | |
inoremap {<CR> {<CR>}<ESC>O | |
inoremap {;<CR> {<CR>};<ESC>O | |
" | |
" Tricks for Nvim | |
au BufEnter * if &buftype == 'terminal' | :startinsert | endif | |
autocmd StdinReadPre * let s:std_in=1 | |
augroup project | |
autocmd! | |
autocmd BufRead,BufNewFile *.h,*.c set filetype=c.doxygen | |
augroup END | |
filetype indent on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment