Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
104 lines (77 sloc) 2.32 KB
" Turn pathogen on
" see .vim/autoload/
" https://github.com/tpope/vim-pathogen
execute pathogen#infect()
" Syntax highlighting
syntax on
" Number of spaces in a tab
set tabstop=4
" Turn on hidden buffers
" Allows background buffers without writing to disk
set hidden
" Turning this on turns tab chars into actual spaces
"set expandtab
" change the leader (many people seem to like comma for some reason)
" default is \
"let mapleader = ','
" I got this somewhere...
set viminfo='0,<50,s10,f0
" Sample let syntax
"let @a='i<!--$a-->'
" Set the list characters for newlines and spaces
set listchars=tab:>-,trail:·,eol:$
" Turn (on|off) the list
" where list means all hidden characters (tab, space, newline)
nmap <silent> <leader>s :set nolist!<CR>
" Turn off syntax highlighting after searches
nmap <silent> <leader>m :silent :nohlsearch<CR>
" double escape to turn off highlighting after search
nnoremap <silent> <Esc><Esc> <Esc>:nohlsearch<CR><Esc>
" Strip all trailing whitespace
nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR>
" Select previously pasted text
nnoremap <leader>v V`]
" / style searches case sensitive ONLY if there is a cap somewhere in it
" glob (*) searches always case sensitive
set ignorecase
set smartcase
" Split vertically and go to new split
nnoremap <leader>w <C-w>v<C-w>l
" Split horizontally and go to new split -- I don't use this much
"nnoremap <leader>e <C-w>s<C-w>k
" http://stevelosh.com/blog/2010/09/coming-home-to-vim/?
set modelines=0
set nocompatible
set gdefault
"set wrap
"set textwidth=79
"set formatoptions=qrn1
set colorcolumn=80
" Line numbering toggle between relative numbering and absolute
function! NumberToggle()
if(&relativenumber == 1)
set number
else
set relativenumber
endif
endfunc
nnoremap <C-n> :call NumberToggle()<cr>
" Set line numbering on
"set number
"nmap <silent> <leader>n :set nu!<CR>
" sets the highlighting in the gutter
highlight clear SignColumn
" TESTING
" causes a vertical split and then search for the tag under cursor.
nnoremap <leader>p <C-w>v<C-w>l<C-]>
" switch to next buffer
nnoremap <leader>n :bnext<CR><Esc>
" END TESTING
colorscheme Tomorrow-Night-Bright
" remap to move splits
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" set the pwd to the dir of whatever file is open
set autochdir