Skip to content

Commit

Permalink
some plugins and more config
Browse files Browse the repository at this point in the history
  • Loading branch information
philc committed Aug 14, 2012
1 parent aedab21 commit 254c1fb
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .gitmodules
@@ -1,3 +1,9 @@
[submodule "pathogen"]
path = pathogen
url = https://github.com/tpope/vim-pathogen.git
[submodule "bundle/nerdcommenter"]
path = bundle/nerdcommenter
url = https://github.com/scrooloose/nerdcommenter.git
[submodule "bundle/command-t"]
path = bundle/command-t
url = https://github.com/cespare/Command-T.git
1 change: 1 addition & 0 deletions bundle/command-t
Submodule command-t added at 43b46b
1 change: 1 addition & 0 deletions bundle/nerdcommenter
Submodule nerdcommenter added at baa453
19 changes: 19 additions & 0 deletions gvimrc
@@ -0,0 +1,19 @@
set guifont=Menlo\ Regular:h16

" Unmap some of macvim's CMD bindings.
if has("gui_macvim")
" macmenu &File.New\ Tab key=<nop>
macmenu &Tools.List\ Errors key=<nop>
map <D-t> :CommandT<CR>
map <D-l> :CommandT<CR>
endif

" Window splits
noremap <D-D> <C-W>v
noremap <D-S-D> <C-W>s
noremap <D-J> <C-W>j
noremap <D-K> <C-W>k
noremap <D-H> <C-W>h
noremap <D-L> <C-W>l

38 changes: 37 additions & 1 deletion vimrc
Expand Up @@ -5,6 +5,8 @@ call pathogen#infect()
set nocompatible " Use smarter defaults than Vi's.
set nobackup " Don't write out backup files.
set noswapfile
set nowritebackup
filetype plugin on

" Chrome
set encoding=utf-8
Expand All @@ -24,6 +26,7 @@ set laststatus=2
set number
set undofile
set scrolloff=4 " Keep 4 lines of context when scrolling
set shortmess+=I " Remove the default splash screen when a new file is created.

" line wrapping
set textwidth=110
Expand Down Expand Up @@ -53,7 +56,7 @@ set gdefault " Apply substitutions globally on a line.
noremap <leader><space> :nohlsearch<cr>
" Basic editing
au FocusLost * :wa " Save file when focus is lost
au FocusLost * silent! wa " Save file when focus is lost
set shiftround " use multiples of shiftwidth when indenting with <
set autoindent
set copyindent
Expand All @@ -62,12 +65,19 @@ filetype plugin indent on
" Textmate-style invisible char markers
set list
set listchars=tab:▸\ ,eol

" Colorscehem
set background=dark
if &t_Co >= 256 || has("gui_running")
colorscheme mustang
"colorscheme twilight256
endif

" Hide the macvim toolbar
if has("gui_running")
set guioptions=egmrt
endif

let mapleader=";"

" Edit and reload vim rc
Expand All @@ -87,3 +97,29 @@ vnoremap <tab> %
" leader-v to reselect pasted text, for indentation purposes etc.
nnoremap <leader>v V`
" Macvim Tabs
" Meta-N to select a tab.
noremap <D-1> 1gt
noremap <D-2> 2gt
noremap <D-3> 3gt
noremap <D-4> 4gt
noremap <D-5> 5gt
noremap <D-6> 6gt
noremap <D-7> 7gt
noremap <D-8> 8gt
noremap <D-9> 9gt
noremap J gT
noremap K gt
" Window splits
noremap <D-D> <C-W>v
noremap <D-S-D> <C-W>s
noremap <D-J> <C-W>j
noremap <D-K> <C-W>k
noremap <D-H> <C-W>h
noremap <D-L> <C-W>l
" commenting (provided by NERDCommenter
let NERDSpaceDelims=1 " Insert one space after comment characters.
map <D-/> <plug>NERDCommenterToggle
map <leader>/ <plug>NERDCommenterToggle

0 comments on commit 254c1fb

Please sign in to comment.