Last active
August 5, 2023 04:08
-
-
Save tabrez/dfb6988228d957682f8f4f983d1748a7 to your computer and use it in GitHub Desktop.
minimal vim config
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
" | |
" A (not so) minimal vimrc. | |
" | |
" You want Vim, not vi. When Vim finds a vimrc, 'nocompatible' is set anyway. | |
" We set it explicitely to make our position clear! | |
set nocompatible | |
filetype plugin indent on " Load plugins according to detected filetype. | |
set autoindent " Indent according to previous line. | |
set expandtab " Use spaces instead of tabs. | |
set softtabstop =2 " Tab key indents by 4 spaces. | |
set shiftwidth =2 " >> indents by 4 spaces. | |
set shiftround " >> indents to next multiple of 'shiftwidth'. | |
set backspace =indent,eol,start " Make backspace work as you would expect. | |
set hidden " Switch between buffers without having to save first. | |
set laststatus =2 " Always show statusline. | |
set display =lastline " Show as much as possible of the last line. | |
set showmode " Show current mode in command-line. | |
set showcmd " Show already typed keys when more are expected. | |
set incsearch " Highlight while searching with / or ?. | |
set hlsearch " Keep matches highlighted. | |
set ttyfast " Faster redrawing. | |
set lazyredraw " Only redraw when necessary. | |
set splitbelow " Open new windows below the current window. | |
set splitright " Open new windows right of the current window. | |
set number " Show absolute line number for current line. | |
set cursorline " Find the current line quickly. | |
set wrapscan " Searches wrap around end-of-file. | |
set report =0 " Always report changed lines. | |
set synmaxcol =200 " Only highlight the first 200 columns. | |
" Put all temporary files under the same directory. | |
" https://github.com/mhinz/vim-galore#temporary-files | |
set backup | |
set backupdir =/tmp | |
set backupext =-vimbackup | |
set backupskip =/tmp | |
set directory =/tmp | |
set updatecount =100 | |
set undofile | |
set undodir =/tmp | |
nnoremap <silent> <C-p> :Files<CR> | |
autocmd FileType hcl setlocal commentstring=#\ %s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment