Bunch of stuff...
So I retab'd this file 'cause I was tired of all the tabs. There are a few other changes too: - Change my SnipMate email address - Fix my trailing whitespace macro so it restores the cursor position - Change up some of the list mode settings
This commit is contained in:
parent
eab8ef0bbd
commit
086eca5ad8
1 changed files with 50 additions and 34 deletions
36
vimrc
36
vimrc
|
@ -34,10 +34,17 @@ set fo+=n " format numbered lists properly
|
|||
set fo+=2 " format paragraphs with first line indent different
|
||||
" from rest
|
||||
|
||||
set list
|
||||
set lcs+=tab:▸\ " show tabs
|
||||
set lcs+=eol:¬ " show end-of-lines
|
||||
set lcs+=trail:・ " show trailing spaces
|
||||
if has('gui_running')
|
||||
set list
|
||||
endif
|
||||
"set lcs+=tab:▸\ " show tabs
|
||||
"set lcs+=eol:¬ " show end-of-lines
|
||||
"set lcs+=trail:・ " show trailing spaces
|
||||
"set lcs+=extends:→ " show long lines (that go offscreen)
|
||||
"set lcs+=nbsp:. " show non-breaking spaces
|
||||
set lcs+=tab:>\ " show tabs
|
||||
set lcs+=eol:$ " show end-of-lines
|
||||
set lcs+=trail:. " show trailing spaces
|
||||
set lcs+=extends:# " show long lines (that go offscreen)
|
||||
set lcs+=nbsp:. " show non-breaking spaces
|
||||
|
||||
|
@ -74,7 +81,7 @@ set tabstop=8 " tabs are always 8 spaces
|
|||
set shiftwidth=4 " shift lines 4 spaces with >> and <<
|
||||
set softtabstop=4 " tab key inserts 4 spaces
|
||||
set shiftround " round off indent to multiple of shiftwidth
|
||||
set smarttab " insert tabs on start of line according to sw, not ts
|
||||
set expandtab " always use spaces
|
||||
set nojoinspaces " insert 1 space instead of 2 after punctuation on line
|
||||
" join
|
||||
set autoindent " always use autoindenting
|
||||
|
@ -104,7 +111,7 @@ if has('autocmd')
|
|||
" spaces as tabs for python
|
||||
autocmd filetype python setlocal expandtab
|
||||
" don't show tabs in html and xml
|
||||
autocmd filetype html,xml set listchars-=tab:>-
|
||||
autocmd filetype html,xml set listchars-=tab:▸\
|
||||
|
||||
" Jump to last known cursor position unless it's the first line, or past the
|
||||
" end of the file
|
||||
|
@ -116,9 +123,13 @@ endif
|
|||
|
||||
" use a colorscheme if the terminal can support it (or we're in a GUI)
|
||||
if &t_Co >= 256 || has('gui_running')
|
||||
set cursorline
|
||||
if has('gui_running')
|
||||
set bg=light
|
||||
colorscheme solarized
|
||||
else
|
||||
set bg=dark
|
||||
colorscheme default
|
||||
endif
|
||||
endif
|
||||
|
||||
" use syntax highlighting if the terminal can support it (or we're in a GUI)
|
||||
|
@ -127,9 +138,10 @@ if &t_Co > 2 || has('gui_running')
|
|||
endif
|
||||
|
||||
" tell SnipMate who I am
|
||||
let g:snips_author = 'Eryn Wells <eryn@3b518c.com>'
|
||||
let g:snips_author = 'Eryn Wells <eryn@erynwells.me>'
|
||||
|
||||
if has('gui_running')
|
||||
set cursorline
|
||||
if has('win32') || has('win64')
|
||||
set guifont=Inconsolata:h18
|
||||
elseif has('mac')
|
||||
|
@ -164,10 +176,14 @@ nnoremap <C-j> <C-w>j
|
|||
nnoremap <C-k> <C-w>k
|
||||
nnoremap <C-l> <C-w>l
|
||||
|
||||
" strip all trailing whitespace in the current file
|
||||
nnoremap <leader>W :%s/\s\+$//<CR>:let @/=''<CR>
|
||||
|
||||
let mapleader=','
|
||||
" strip all trailing whitespace in the current file
|
||||
nnoremap <leader>W mkHml:%s/\v\s+$//<CR>`lzt`k
|
||||
" edit and source my .vimrc
|
||||
nmap <silent> <leader>ev :e $MYVIMRC<CR>
|
||||
nmap <silent> <leader>sv :so $MYVIMRC<CR>
|
||||
" hide search terms
|
||||
nmap <silent> <leader><space> :nohlsearch<CR>
|
||||
" find all
|
||||
nmap <leader>fa :%s/\v
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue