Created
April 1, 2018 17:46
-
-
Save binaryk/e341dd7366d4a6162e7e5410942b9a66 to your computer and use it in GitHub Desktop.
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
set nocompatible | |
filetype indent plugin on | |
syntax on | |
set hidden | |
set wildmenu | |
set showcmd | |
set hlsearch | |
set ignorecase | |
set smartcase | |
" Allow backspacing over autoindent, line breaks and start of insert action | |
set backspace=indent,eol,start | |
" When opening a new line and no filetype-specific indenting is enabled, keep | |
" the same indent as the line you're currently on. Useful for READMEs, etc. | |
set autoindent | |
" Stop certain movements from always going to the first character of a line. | |
" While this behaviour deviates from that of Vi, it does what most users | |
" coming from other editors would expect. | |
set nostartofline | |
" Display the cursor position on the last line of the screen or in the status | |
" line of a window | |
set ruler | |
" Always display the status line, even if only one window is displayed | |
set laststatus=2 | |
" Instead of failing a command because of unsaved changes, instead raise a | |
" dialogue asking if you wish to save changed files. | |
set confirm | |
" Use visual bell instead of beeping when doing something wrong | |
set visualbell | |
" And reset the terminal code for the visual bell. If visualbell is set, and | |
" this line is also included, vim will neither flash nor beep. If visualbell | |
" is unset, this does nothing. | |
set t_vb= | |
" Enable use of the mouse for all modes | |
set mouse=a | |
" Set the command window height to 2 lines, to avoid many cases of having to | |
" "press <Enter> to continue" | |
set cmdheight=2 | |
" Display line numbers on the left | |
set number | |
" Quickly time out on keycodes, but never time out on mappings | |
set notimeout ttimeout ttimeoutlen=200 | |
" Use <F11> to toggle between 'paste' and 'nopaste' | |
set pastetoggle=<F11> | |
"------------------------------------------------------------ | |
" Indentation options {{{1 | |
" | |
" Indentation settings according to personal preference. | |
" Indentation settings for using 4 spaces instead of tabs. | |
" Do not change 'tabstop' from its default value of 8 with this setup. | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab | |
" Indentation settings for using hard tabs for indent. Display tabs as | |
" four characters wide. | |
"set shiftwidth=4 | |
"set tabstop=4 | |
"------------------------------------------------------------ | |
" Mappings {{{1 | |
" | |
" Useful mappings | |
" Map Y to act like D and C, i.e. to yank until EOL, rather than act as yy, | |
" which is the default | |
map Y y$ | |
" Map <C-L> (redraw screen) to also turn off search highlighting until the | |
" next search | |
nnoremap <C-L> :nohl<CR><C-L> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment