Last active
August 23, 2017 00:48
-
-
Save johnbaldwin/454726454ad47b78bbf12f806c758e74 to your computer and use it in GitHub Desktop.
vimrc for working on a cloud server or vagrant box
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 number | |
set colorcolumn=80 | |
:hi ColorColumn ctermbg=darkgray ctermfg=lightgray | |
set ls=2 "status line | |
set background=dark | |
set tabstop=4 | |
filetype plugin indent on "http://vimdoc.sourceforge.net/htmldoc/filetype.html | |
set shiftwidth=4|set softtabstop=4|set expandtab | |
" alternately: | |
" set sw=4 ts=4 sts=4 "Defaults: four spaces per tab " | |
" http://stackoverflow.com/questions/6012470/possible-to-change-length-of-tab-depending-on-file-extension | |
" shiftwidth (sw) controls the number of spaces for automatic indentation | |
" and some shifting commands, like << in normal mode. | |
" tabstop (ts) controls visual length of a real tab character. You might want | |
" to leave defaults (8 visual cels) | |
" softtab (sts) controls what is being inserted/removed when you press <Tab> | |
" and <CR>. A suggestion is to set this the same as tabstop or set it along | |
" with 'expandtab'. Otherwise it will produce ugly tabs and spaces indentation | |
"Colors | |
:hi Comment ctermfg=darkgray | |
autocmd FileType html :setlocal sw=2 ts=2 sts=2 "Two spaces for HTML files " | |
nnoremap <F2> :set invpaste paste?<CR> | |
set pastetoggle=<F2> | |
set showmode | |
set ruler | |
" http://vim.wikia.com/wiki/Toggle_auto-indenting_for_code_paste | |
" Whitespace highlighting | |
:highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen | |
" Show trailing whitespace | |
:match ExtraWhitespace /\s\+\%#\@<!$/ | |
" The 'filetype plugin indent on' line will force hardtabs where appropriate, such as Makefiles, but still leave softtabs everywhere else. | |
" au BufRead,BuffNewFile *.py,*.pyw,*.c,*.h set tabstop=8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment