Skip to content

Commit

Permalink
Reorganization and a few extra tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
arvida committed Apr 24, 2012
1 parent 7ab1738 commit 568b648
Showing 1 changed file with 35 additions and 9 deletions.
44 changes: 35 additions & 9 deletions vimrc
Expand Up @@ -9,14 +9,26 @@
" return = clear highlights from search " return = clear highlights from search
" ,p = previous buffer " ,p = previous buffer
" ctrl-j/k = jump paragraph " ctrl-j/k = jump paragraph
"
set nocompatible

" Pathogenize it!
call pathogen#infect()

if has("gui_running")
set shellcmdflag=-ic
set guioptions=egmrt
set gfn=Menlo\ for\ Powerline:h14
set shell=bash
set guioptions-=r
endif


set hidden set hidden
set nocompatible
let mapleader = "," let mapleader = ","
map q :CommandT<CR>
set ttyfast set ttyfast
set encoding=utf-8


" Make clipbaord work with MacOS " Make clipboard work with MacOS
set clipboard=unnamed set clipboard=unnamed


autocmd FileType c,cpp,java,php,ruby,eruby autocmd BufWritePre <buffer> :call setline(1,map(getline(1,"$"),'substitute(v:val,"\\s\\+$","","")')) autocmd FileType c,cpp,java,php,ruby,eruby autocmd BufWritePre <buffer> :call setline(1,map(getline(1,"$"),'substitute(v:val,"\\s\\+$","","")'))
Expand Down Expand Up @@ -56,16 +68,22 @@ set ignorecase " Ignore case when searching
set smartcase " Ignore case when searching lowercase set smartcase " Ignore case when searching lowercase


" Colors ********************************************************************** " Colors **********************************************************************
set t_Co=256 if has("gui_running")
syntax on colorscheme Tomorrow-Night-Eighties-My
set background=dark else
colorscheme Tomorrow-Night-Eighties syntax on
set background=dark
set t_Co=256
set term=xterm-256color
colorscheme Tomorrow-Night-Eighties-My
endif


" Status Line ***************************************************************** " Status Line *****************************************************************
set showcmd set showcmd
set ruler set ruler
set laststatus=2 set laststatus=2
set statusline=%F\ %m\ %{fugitive#statusline()}\ %y%=%l,%c\ %P " show git branch "set statusline=%F\ %m\ %{fugitive#statusline()}\ %y%=%l,%c\ %P " show git branch
let g:Powerline_symbols = 'fancy' " the statusline of power and awesomness


" Line Wrapping *************************************************************** " Line Wrapping ***************************************************************
set nowrap set nowrap
Expand All @@ -87,7 +105,6 @@ set ofu=syntaxcomplete#Complete
" Mouse *********************************************************************** " Mouse ***********************************************************************
set mouse=a " Enable the mouse set mouse=a " Enable the mouse
set mousemodel=extend set mousemodel=extend
set term=xterm-256color


" Misc settings *************************************************************** " Misc settings ***************************************************************
set number " Show line numbers set number " Show line numbers
Expand Down Expand Up @@ -121,6 +138,10 @@ map <down> <nop>
map <left> <nop> map <left> <nop>
map <right> <nop> map <right> <nop>
" CommandT for opening files fast, Tab limits scope to open in buffers
map q :CommandT<CR>
map <Tab> :CommandTBuffer<CR>
" Map tab for indenting (alt-key, like in textmate) " Map tab for indenting (alt-key, like in textmate)
nmap <A-S-Tab> << nmap <A-S-Tab> <<
nmap <A-Tab> >> nmap <A-Tab> >>
Expand All @@ -143,6 +164,8 @@ nmap <Space> i_<Esc>r
" https://github.com/henrik/dotfiles/commit/aaa45c1cc0f9a6195a9155223a7e904aa10b256f " https://github.com/henrik/dotfiles/commit/aaa45c1cc0f9a6195a9155223a7e904aa10b256f
command! -bar -range=% NotRocket execute '<line1>,<line2>s/:\(\w\+\)\s*=>/\1:/e' . (&gdefault ? '' : 'g') command! -bar -range=% NotRocket execute '<line1>,<line2>s/:\(\w\+\)\s*=>/\1:/e' . (&gdefault ? '' : 'g')


nmap <silent> <Leader>z :execute 'ConqueTermVSplit zsh -l'<CR>
" Omni Completion ************************************************************* " Omni Completion *************************************************************
autocmd FileType html :set omnifunc=htmlcomplete#CompleteTags autocmd FileType html :set omnifunc=htmlcomplete#CompleteTags
autocmd FileType python set omnifunc=pythoncomplete#Complete autocmd FileType python set omnifunc=pythoncomplete#Complete
Expand All @@ -156,10 +179,13 @@ autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1 autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
autocmd FileType ruby,eruby let g:rubycomplete_rails = 1 autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1 autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
autocmd BufRead,BufNewFile {Capfile,Gemfile,Rakefile,Thorfile,config.ru,.caprc,.irbrc,irb_tempfile*} set ft=ruby


" ----------------------------------------------------------------------------- " -----------------------------------------------------------------------------
" | Plug-ins | " | Plug-ins |
" ----------------------------------------------------------------------------- " -----------------------------------------------------------------------------

set completefunc=syntaxcomplete#Complete


" NERDTree ******************************************************************** " NERDTree ********************************************************************
:noremap <Leader>n :NERDTreeToggle<CR> :noremap <Leader>n :NERDTreeToggle<CR>
Expand Down

0 comments on commit 568b648

Please sign in to comment.