Last active
December 14, 2015 20:19
-
-
Save pamolloy/5142818 to your computer and use it in GitHub Desktop.
An in-progress vim configuration file
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
" SHOW INVISIBLES | |
" vimcasts.org/episodes/show-invisibles/ | |
" Disable syntax highlighting for Markdown files | |
autocmd BufRead,BufNewFile *.md syntax off | |
" Shortcut to toggle `set list` with `\l` | |
" Note the "mapleader" variable is set to backslash by default | |
nmap <leader>l :set list!<CR> | |
" Use the same symbols as TextMate for tabstops and EOLs | |
" To insert a unicode character type `Ctrl-v` followed by the unicode value (e.g. `u1234`) | |
set listchars=tab:▸\ ,eol:¬ | |
set list | |
" TABS AND SPACES | |
" vimcasts.org/episodes/tabs-and-spaces | |
" `tabstop` - width of tabs | |
" `expandtab` - boolean value, replace with spaces | |
" `softtabstop` - width using tab key and backspace in insert mode, supersedes `tabstop` | |
" `shiftwidth` - width using `>` and `<` indentation keys in normal mode | |
set ts=4 sts=4 sw=4 noexpandtab | |
" WHITESPACE PREFERENCES AND FILETYPES | |
" vimcasts.org/episodes/whitespace-preferences-and-filetypes | |
" If vim has been compiled with autocommand | |
" Then load settings based on file type | |
if has ("autocmd") | |
filetype on | |
"autocmd FileType html setlocal ts=2 sts=2 sw=2 expandtab | |
"autocmd BufNewFile,BufRead *.md,*.markdown setfiletype | |
endif | |
" Other | |
set number | |
syntax on | |
filetype plugin on | |
filetype indent on | |
" Latex-Suite | |
" http://vim-latex.sourceforge.net/documentation/latex-suite/recommended-settings.html | |
" grep will sometimes skip displaying the file name if you | |
" search in a singe file. This will confuse Latex-Suite. Set your grep | |
" program to always generate a file-name. | |
set grepprg=grep\ -nH\ $* | |
" Starting with Vim 7, the filetype of empty .tex files defaults to | |
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded. | |
" The following changes the default filetype back to 'tex': | |
let g:tex_flavor='latex' | |
" Switches on the 'spell' option and specify to check for US English | |
setlocal spell spelllang=en_us |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment