Skip to content

Instantly share code, notes, and snippets.

@szxp
Last active April 21, 2019 12:10
Show Gist options
  • Save szxp/5a22cb1ab8ad3ba48cf9b5343c9dfa71 to your computer and use it in GitHub Desktop.
Save szxp/5a22cb1ab8ad3ba48cf9b5343c9dfa71 to your computer and use it in GitHub Desktop.
set nocompatible
"Show line numbers
set number
"Show partial matches for a search phrase
set incsearch
"Highlight all matching phrases
set hlsearch
"This specifies where in Insert mode the <BS> is allowed to delete the
"character in front of the cursor. The three items, separated by commas, tell
"Vim to delete the white space at the start of the line, a line break and the
"character before where Insert mode started.
set backspace=indent,eol,start
"Use the indent of the previous line for a newly created line
set autoindent
"Keep 100 commands and 100 search patterns in the history
set history=100
"Display the current cursor position in the lower right corner of the Vim window
set ruler
"Display an incomplete command in the lower right corner of the Vim window
set showcmd
"Enable Filetype detection
filetype plugin indent on
"Break text to avoid lines getting longer than 78 characters
autocmd FileType text setlocal textwidth=78
:set colorcolumn=72
"Mode Settings
let &t_SI.="\e[5 q" "SI = INSERT mode
let &t_SR.="\e[4 q" "SR = REPLACE mode
let &t_EI.="\e[1 q" "EI = NORMAL mode (ELSE)
"Cursor settings:
" 1 -> blinking block
" 2 -> solid block
" 3 -> blinking underscore
" 4 -> solid underscore
" 5 -> blinking vertical bar
" 6 -> solid vertical bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment