Last active
September 13, 2023 15:38
-
-
Save Schwitzd/19728e3402c6595e67141fba67529f12 to your computer and use it in GitHub Desktop.
.vimrc
This file contains hidden or 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 behavior | |
| set number " Show line numbers | |
| set wrap " Wrap lines | |
| set encoding=utf-8 " Set encoding to UTF-8 | |
| set wildmenu " Visual autocomplete for command menu | |
| set lazyredraw " Redraw screen only when we need to | |
| set showmatch " Highlight matching parentheses / brackets [{()}] | |
| set laststatus=2 " Always show statusline (even with only single window) | |
| set ruler " Show line and column number of the cursor on right side of statusline | |
| set visualbell " Blink cursor on error, instead of beeping | |
| set title " Change terminal title | |
| set hidden " Allow hidden buffers | |
| "" Text basics | |
| set textwidth=80 " Set text to wrap at 80 columns | |
| set spell " Enable spellcheck | |
| "" Tab settings | |
| set tabstop=4 " Width that a <TAB> character displays as | |
| set expandtab " Convert <TAB> key-presses to spaces | |
| set shiftwidth=4 " Number of spaces to use for each step of (auto)indent | |
| set softtabstop=4 " Backspace after pressing <TAB> will remove up to this many spaces | |
| set shiftround " Indent/outdent to nearest tabstop | |
| set smarttab " Uses shiftwidth @ start of lines | |
| set autoindent " Copy indent from current line when starting a new line | |
| set smartindent " Even better autoindent (e.g. add indent after '{') | |
| "" Search settings | |
| nnoremap / /\v | |
| vnoremap / /\v | |
| set hlsearch " Highlights search terms | |
| set incsearch " Highlights search terms as you type them | |
| set ignorecase " Ignores case when searching | |
| set smartcase " Unless you put some caps in your search term | |
| set showmatch " Highlights matching parentheses | |
| map <leader><space> :let @/=''<cr> | |
| "" For plugins to load correctly | |
| filetype plugin indent on | |
| "" Color scheme | |
| syntax enable | |
| colorscheme monokai | |
| "" Backup | |
| set nobackup " Do not keep backup files | |
| set noswapfile " Do not write swap files | |
| "" Statusline | |
| set statusline=%f\ %y\ %r%m%h%w\ [%{&fileformat.'/'.&fileencoding}]\ [%l/%L]\ [Line:%3l]\ [Col:%2v] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment