Last active
October 4, 2023 00:04
-
-
Save Kyllingene/7a64b294be5f83d2f1a65008e4f02cf1 to your computer and use it in GitHub Desktop.
My no-plugins vim configuration. Uses external theme.
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
" basic settings | |
set relativenumber | |
set number | |
syntax on | |
set backspace=indent,eol,start | |
set so=10 | |
" theme | |
set background=dark | |
"" using morhetz/gruvbox | |
autocmd vimenter * ++nested colorscheme gruvbox | |
" indentation | |
set expandtab | |
set shiftwidth=4 | |
set tabstop=4 | |
set autoindent | |
set smartindent | |
" change swap file locations to save git | |
set backupdir=~/.vim/backup// | |
set directory=~/.vim/swap// | |
set undodir=~/.vim/undo// | |
"" keymaps | |
" make \\ comment out a line | |
au FileType vim nmap <buffer> \\ I" <Esc> | |
au FileType sh,zsh,csh,tcsh,make,py nmap <buffer> \\ I# <Esc> | |
au FileType html,xhtml,xml,xslt,dtd,xsd nmap <buffer> \\ I<!-- <Esc>A --><Esc> | |
au FileType sql,haskell nmap <buffer> \\ I-- <Esc> | |
au FileType c nmap <buffer> \\ I/* <Esc>A */<Esc> | |
au FileType cpp,rs,zig nmap <buffer> \\ I// <Esc> | |
au FileType * nmap <buffer> \\ 0i# <Esc> | |
"" document display | |
set conceallevel=2 | |
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
"" basic settings | |
set relativenumber | |
set number | |
syntax on | |
set backspace=indent,eol,start | |
set so=10 | |
" theme | |
set background=dark | |
"" using morhetz/gruvbox | |
autocmd vimenter * ++nested colorscheme gruvbox | |
" indentation | |
set expandtab | |
set shiftwidth=4 | |
set tabstop=4 | |
set autoindent | |
set smartindent | |
" change swap file locations to save git | |
set backupdir=~/.vim/backup// | |
set directory=~/.vim/swap// | |
set undodir=~/.vim/undo// | |
"" keymaps | |
" make \\ comment out a line | |
au FileType vim nmap <buffer> \\ I" <Esc> | |
au FileType sh,zsh,csh,tcsh,make,py nmap <buffer> \\ I# <Esc> | |
au FileType html,xhtml,xml,xslt,dtd,xsd nmap <buffer> \\ I<!-- <Esc>A --><Esc> | |
au FileType sql,haskell nmap <buffer> \\ I-- <Esc> | |
au FileType c nmap <buffer> \\ I/* <Esc>A */<Esc> | |
au FileType cpp,rs,zig nmap <buffer> \\ I// <Esc> | |
au FileType * nmap <buffer> \\ 0i# <Esc> | |
"" document display | |
set conceallevel=2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment