Fixed some vimrc stuff

This commit is contained in:
Tyrel Souza 2016-02-18 22:17:53 -05:00
parent 804c920cda
commit 509096059a
3 changed files with 10 additions and 63 deletions

View File

@ -7,7 +7,6 @@ ln -s $(pwd)/hushlogin ~/.hushlogin
ln -s $(pwd)/vim ~/.vim
ln -s $(pwd)/vimrc ~/.vimrc
ln -s $(pwd)/vimrc.bundles ~/.vimrc.bundles
ln -s $(pwd)/vimrc.local ~/.vimrc.local
ln -s $(pwd)/zshrc ~/.zshrc
# Setup vim

69
vimrc
View File

@ -1,6 +1,7 @@
" Use Vim settings, rather then Vi settings. This setting must be as early as
" possible, as it has side effects.
set nocompatible
colorscheme monokai
" Leader
let mapleader = " "
@ -18,9 +19,7 @@ set autowrite " Automatically :write before running commands
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if (&t_Co > 2 || has("gui_running")) && !exists("syntax_on")
syntax on
endif
syntax on
if filereadable(expand("~/.vimrc.bundles"))
source ~/.vimrc.bundles
@ -39,27 +38,16 @@ augroup vimrcEx
\ exe "normal g`\"" |
\ endif
" Cucumber navigation commands
autocmd User Rails Rnavcommand step features/step_definitions -glob=**/* -suffix=_steps.rb
autocmd User Rails Rnavcommand config config -glob=**/* -suffix=.rb -default=routes
" Set syntax highlighting for specific file types
autocmd BufRead,BufNewFile Appraisals set filetype=ruby
autocmd BufRead,BufNewFile *.md set filetype=markdown
" Enable spellchecking for Markdown
autocmd FileType markdown setlocal spell
" Automatically wrap at 80 characters for Markdown
autocmd BufRead,BufNewFile *.md setlocal textwidth=80
" Allow stylesheets to autocomplete hyphenated words
autocmd FileType css,scss,sass setlocal iskeyword+=-
augroup END
" Softtabs, 2 spaces
set tabstop=2
set shiftwidth=2
set tabstop=4
set shiftwidth=4
set shiftround
set expandtab
@ -76,54 +64,17 @@ if executable('ag')
let g:ctrlp_use_caching = 0
endif
" Color scheme
colorscheme github
highlight NonText guibg=#060606
highlight Folded guibg=#0A0A0A guifg=#9090D0
" Make it obvious where 80 characters is
set textwidth=80
set colorcolumn=+1
" Numbers
set number
set numberwidth=5
" Tab completion
" will insert tab at beginning of line,
" will use completion if not at beginning
set wildmode=list:longest,list:full
function! InsertTabWrapper()
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k'
return "\<tab>"
else
return "\<c-p>"
endif
endfunction
inoremap <Tab> <c-r>=InsertTabWrapper()<cr>
inoremap <S-Tab> <c-n>
" Exclude Javascript files in :Rtags via rails.vim due to warnings when parsing
let g:Tlist_Ctags_Cmd="ctags --exclude='*.js'"
" Index ctags from any project, including those outside Rails
map <Leader>ct :!ctags -R .<CR>
set numberwidth=4
" Switch between the last two files
nnoremap <leader><leader> <c-^>
" Get off my lawn
nnoremap <Left> :echoe "Use h"<CR>
nnoremap <Right> :echoe "Use l"<CR>
nnoremap <Up> :echoe "Use k"<CR>
nnoremap <Down> :echoe "Use j"<CR>
" vim-rspec mappings
nnoremap <Leader>t :call RunCurrentSpecFile()<CR>
nnoremap <Leader>s :call RunNearestSpec()<CR>
nnoremap <Leader>l :call RunLastSpec()<CR>
" Run commands that require an interactive shell
nnoremap <Leader>r :RunInInteractiveShell<space>
@ -144,12 +95,12 @@ nnoremap <C-l> <C-w>l
let g:syntastic_check_on_open=1
let g:syntastic_html_tidy_ignore_errors=[" proprietary attribute \"ng-"]
" Set spellfile to location that is guaranteed to exist, can be symlinked to
" Dropbox or kept in Git and managed outside of thoughtbot/dotfiles using rcm.
set spellfile=$HOME/.vim-spell-en.utf-8.add
" Local config
if filereadable($HOME . "/.vimrc.local")
source ~/.vimrc.local
endif
colorscheme monokai
" Fix for airline fonts
let g:airline_powerline_fonts = 1
set paste

View File

@ -1,3 +0,0 @@
colorscheme monokai
let g:airline_powerline_fonts = 1
set paste