Created
January 19, 2019 18:52
-
-
Save akrabat/8299274e66e191947e94faa24abe34d3 to your computer and use it in GitHub Desktop.
Basic vim setup ~/.vim/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
set nocompatible | |
" General settings | |
syntax on | |
filetype plugin indent on | |
set autoread " Automatically reload changed files | |
set autowrite " Automatically save before :next, :make etc. | |
set backspace=indent,eol,start " backspace from this line to the previous one | |
set encoding=utf-8 " UTF-8 is good… | |
set formatoptions+=j " Delete comment character when joining commented lines | |
set hidden " Buffer switching without saving | |
set hlsearch " Highlight search terms | |
set laststatus=2 " Always display the status bar | |
set linebreak " Wrap long lines at a character in 'breakat' | |
set noerrorbells " No beeps | |
set novisualbell " No flashes | |
set number " Display line numbers | |
set ruler " Display line and column | |
set shortmess+=I " Disable splash text | |
set showcmd | |
set ignorecase " Case insensitive search | |
set smartcase " Case sensitive when an upper case letter is present | |
set splitbelow " Split horizontal windows below to the current windows | |
set splitright " Split vertical windows right to the current windows | |
set t_Co=256 " 256 colours | |
set t_vb= " No flashes! | |
if (has("termguicolors")) | |
set termguicolors " vim 8 colours | |
endif | |
set timeoutlen=1200 " Timeout for <leader> | |
set title " Change the terminal's title | |
set titleold= | |
set titlestring=Vim:\ %F | |
set undolevels=1000 " Many levels of undo | |
set whichwrap+=<,>,h,l,[,] " Allow cursor to move to next line | |
set scrolloff=5 " Not quite the bottom or the top | |
set backupdir=~/.vim-backup " Directory for backup files when saving | |
set directory=~/.vim-backup " Directory for swap files | |
" Indentation | |
set autoindent | |
set expandtab " Tabs are spaces, not tabs | |
set shiftround " Use multiple of shiftwidth when indenting with '<' and '>' | |
set shiftwidth=4 " Use indents of 4 spaces | |
set smartindent " Smart intent if filetype doesn't do it better | |
set smarttab " Tab to the right place | |
set softtabstop=4 " Number of spaces that a <tab> counts for | |
set tabstop=4 " An indentation every four columns |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment