Skip to content

Instantly share code, notes, and snippets.

@vito
Created November 25, 2008 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vito/2806bf9f0fb1424fd375 to your computer and use it in GitHub Desktop.
Save vito/2806bf9f0fb1424fd375 to your computer and use it in GitHub Desktop.
set nocompatible
set hidden
set ignorecase
set smartcase
set incsearch
set smarttab
set expandtab
set tabstop=4
set shiftwidth=4
set lines=58
set columns=185
set path=**
set cursorline
set number
set numberwidth=5
set guioptions-=T
set guifont=Pragmata_TT:h9
set antialias!
set wildmenu
set ruler
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
syntax on
filetype on
filetype plugin on
filetype indent on
colorscheme text_ex_machina
imap <D-/> <ESC>,c
nmap <D-/> ,c
vmap <D-/> ,c
inoremap <D-]> <tab>
nnoremap <D-]> >>
vnoremap <D-]> >
inoremap <D-[> <esc><<i
nnoremap <D-[> <<
vnoremap <D-[> <
nnoremap ' `
nnoremap ` '
runtime macros/matchit.vim
"inoremap <D-t> <ESC>:FuzzyFinderTextMate<CR>
"nnoremap <D-t> :FuzzyFinderTextMate<CR>
"nnoremap <tab> <esc>
"vnoremap <tab> <esc>gV
"onoremap <tab> <esc>
"inoremap <tab> <esc>`^
set enc=utf-8
nnoremap <D-F> :Rgrep<CR>
autocmd BufRead *.twig set filetype=htmltwig
autocmd FileType python setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4
autocmd FileType ruby setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=2
autocmd FileType yaml setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=2
" Find file in current directory and edit it.
function! Find(name)
let l:list=system("find . -name '".a:name."' | perl -ne 'print \"$.\\t$_\"'")
let l:num=strlen(substitute(l:list, "[^\n]", "", "g"))
if l:num < 1
echo "'".a:name."' not found"
return
endif
if l:num != 1
echo l:list
let l:input=input("Which ? (CR=nothing)\n")
if strlen(l:input)==0
return
endif
if strlen(substitute(l:input, "[0-9]", "", "g"))>0
echo "Not a number"
return
endif
if l:input<1 || l:input>l:num
echo "Out of range"
return
endif
let l:line=matchstr("\n".l:list, "\n".l:input."\t[^\n]*")
else
let l:line=l:list
endif
let l:line=substitute(l:line, "^[^\t]*\t./", "", "")
execute ":e ".l:line
endfunction
command! -nargs=1 Find :call Find("<args>")
map <F6> :echo "hi<".synIDattr(synID(line("."),col("."),1),"name")."> trans<".synIDattr(synID(line("."),col("."),0),"name")."> lo<".synIDattr(synIDtrans(synID(line("."),col("."),1)),"name").">"<CR>
map <leader>t :FuzzyFinderTextMate<CR>
let php_highlight_quotes = 1
let php_short_tags = 0
let Grep_Xargs_Options = "-0"
let g:NERDShutUp = 1
let g:PHP_default_indenting = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment