diff --git a/.gitmodules b/.gitmodules index 0e42b55..e863cc7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,12 @@ [submodule "guake/guake-colors-solarized"] path = guake/guake-colors-solarized url = https://github.com/coolwanglu/guake-colors-solarized.git +[submodule "vim/vim.symlink/bundle/pathogen"] + path = vim/vim.symlink/bundle/pathogen + url = https://github.com/tpope/vim-pathogen.git +[submodule "vim/vim.symlink/bundle/command-t"] + path = vim/vim.symlink/bundle/command-t + url = git://git.wincent.com/command-t.git +[submodule "vim/vim.symlink/bundle/align"] + path = vim/vim.symlink/bundle/align + url = http://github.com/tsaleh/vim-align.git diff --git a/Rakefile b/Rakefile index 8fa2a8a..541b883 100644 --- a/Rakefile +++ b/Rakefile @@ -54,4 +54,8 @@ task :uninstall do end end +task :command_t do + `cd ~/.vim/bundle/command-t/ruby/command-t/ && ruby extconf.rb && make` +end + task :default => 'install' \ No newline at end of file diff --git a/vim/gvimrc.symlink b/vim/gvimrc.symlink new file mode 100644 index 0000000..02086a2 --- /dev/null +++ b/vim/gvimrc.symlink @@ -0,0 +1,26 @@ +colorscheme desert +set anti +set lines=999 columns=84 +set guioptions=egmrt + +" Open Command+T in a new tab +let g:CommandTAcceptSelectionTabMap='' + +" C-TAB and C-SHIFT-TAB cycle tabs forward and backward +nmap :tabnext +imap :tabnext +vmap :tabnext +nmap :tabprevious +imap :tabprevious +vmap :tabprevious + +" C-# switches to tab +nmap 1gt +nmap 2gt +nmap 3gt +nmap 4gt +nmap 5gt +nmap 6gt +nmap 7gt +nmap 8gt +nmap 9gt \ No newline at end of file diff --git a/vim/vim.symlink/autoload/pathogen.vim b/vim/vim.symlink/autoload/pathogen.vim new file mode 100644 index 0000000..be68389 --- /dev/null +++ b/vim/vim.symlink/autoload/pathogen.vim @@ -0,0 +1,230 @@ +" pathogen.vim - path option manipulation +" Maintainer: Tim Pope +" Version: 2.0 + +" Install in ~/.vim/autoload (or ~\vimfiles\autoload). +" +" For management of individually installed plugins in ~/.vim/bundle (or +" ~\vimfiles\bundle), adding `call pathogen#infect()` to your .vimrc +" prior to `fileype plugin indent on` is the only other setup necessary. +" +" The API is documented inline below. For maximum ease of reading, +" :set foldmethod=marker + +if exists("g:loaded_pathogen") || &cp + finish +endif +let g:loaded_pathogen = 1 + +" Point of entry for basic default usage. Give a directory name to invoke +" pathogen#runtime_append_all_bundles() (defaults to "bundle"), or a full path +" to invoke pathogen#runtime_prepend_subdirectories(). Afterwards, +" pathogen#cycle_filetype() is invoked. +function! pathogen#infect(...) abort " {{{1 + let source_path = a:0 ? a:1 : 'bundle' + if source_path =~# '[\\/]' + call pathogen#runtime_prepend_subdirectories(source_path) + else + call pathogen#runtime_append_all_bundles(source_path) + endif + call pathogen#cycle_filetype() +endfunction " }}}1 + +" Split a path into a list. +function! pathogen#split(path) abort " {{{1 + if type(a:path) == type([]) | return a:path | endif + let split = split(a:path,'\\\@,'edit',) +command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',) +command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',) +command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',) +command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',) +command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',) +command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',) +command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,'lcd') + +" vim:set ft=vim ts=8 sw=2 sts=2: diff --git a/vim/vim.symlink/bundle/align b/vim/vim.symlink/bundle/align new file mode 160000 index 0000000..fa5fdee --- /dev/null +++ b/vim/vim.symlink/bundle/align @@ -0,0 +1 @@ +Subproject commit fa5fdeeea25269c3e83262c03dfa1ccd27dbd3c9 diff --git a/vim/vim.symlink/bundle/command-t b/vim/vim.symlink/bundle/command-t new file mode 160000 index 0000000..18686a8 --- /dev/null +++ b/vim/vim.symlink/bundle/command-t @@ -0,0 +1 @@ +Subproject commit 18686a82a2e4d015b877bf0b6867a269aa8a284f diff --git a/vim/vim.symlink/bundle/pathogen b/vim/vim.symlink/bundle/pathogen new file mode 160000 index 0000000..ede9571 --- /dev/null +++ b/vim/vim.symlink/bundle/pathogen @@ -0,0 +1 @@ +Subproject commit ede9571bc3e17924b8b78de845b117ad298bc43f diff --git a/vim/vimrc.symlink b/vim/vimrc.symlink new file mode 100644 index 0000000..960ec8c --- /dev/null +++ b/vim/vimrc.symlink @@ -0,0 +1,102 @@ +source ~/.vim/bundle/pathogen/autoload/pathogen.vim + +call pathogen#infect() + +" ---------------------------------------------------------------------------- +" Text Formatting +" ---------------------------------------------------------------------------- + +set autoindent " automatic indent new lines +set smartindent " be smart about it +inoremap # X# +set nowrap " do not wrap lines +set softtabstop=2 " yep, two +set shiftwidth=2 " .. +set tabstop=4 +set expandtab " expand tabs to spaces +set nosmarttab " fuck tabs +set formatoptions+=n " support for numbered/bullet lists +"set textwidth=80 " wrap at 80 chars by default +set virtualedit=block " allow virtual edit in visual block .. + +" ---------------------------------------------------------------------------- +" Remapping +" ---------------------------------------------------------------------------- + +" lead with , +let mapleader = "," + +" exit to normal mode with 'jj' +inoremap jj + + +" reflow paragraph with Q in normal and visual mode +nnoremap Q gqap +vnoremap Q gq + +" sane movement with wrap turned on +nnoremap j gj +nnoremap k gk +vnoremap j gj +vnoremap k gk +nnoremap gj +nnoremap gk +vnoremap gj +vnoremap gk +inoremap gj +inoremap gk + +" toggle highlight trailing whitespace +nmap s :set nolist! + +" Make shift-insert work like in Xterm +map +map! + +" ,n to get the next location (compilation errors, grep etC) +nmap n :cn + +" driving me insane this thing +nmap :W :w +nmap :Q :q +nmap :E :e + +" ---------------------------------------------------------------------------- +" UI +" ---------------------------------------------------------------------------- + +set ruler " show the cursor position all the time +set noshowcmd " don't display incomplete commands +set nolazyredraw " turn off lazy redraw +set number " line numbers +set wildmenu " turn on wild menu +set wildmode=list:longest,full +set ch=2 " command line height +set backspace=2 " allow backspacing over everything in insert mode +set whichwrap+=<,>,h,l,[,] " backspace and cursor keys wrap to +set shortmess=filtIoOA " shorten messages +set report=0 " tell us about changes +set nostartofline " don't jump to the start of line when scrolling + + +" ---------------------------------------------------------------------------- +" Visual Cues +" ---------------------------------------------------------------------------- + +set showmatch " brackets/braces that is +set mat=5 " duration to show matching brace (1/10 sec) +set incsearch " do incremental searching +set laststatus=2 " always show the status line +set ignorecase " ignore case when searching +set nohlsearch " don't highlight searches +set visualbell " shut the fuck up + + +" --------------------------------------------------------------------------- +" Strip all trailing whitespace in file +" --------------------------------------------------------------------------- + +function! StripWhitespace () + exec ':%s/ \+$//gc' +endfunction +map ,s :call StripWhitespace ()