Skip to content

Commit

Permalink
add dict, tidy, update vimrc
Browse files Browse the repository at this point in the history
  • Loading branch information
capatillo committed Jun 23, 2012
1 parent ee91f3a commit 05d8dbe
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 18 deletions.
5 changes: 5 additions & 0 deletions dict.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
getElementById.
getElementsByTagName.
getElementsByClassName.
document.
console.log(
52 changes: 52 additions & 0 deletions plugin/tidy.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
" ============================================================================
" File: tidy.vim
" Author: Gary Johnson <[email protected]>
" Created: Thu Nov 8 08:50:11 2001
" Last Modified: Wed Jan 9 00:19:15 2002
" Version: $Revision: 1.3 $
" Description:
" The :Tidy command finds and reports errors in HTML files in the
" same manner that :make reports errors in other languages. It
" does this by running the 'tidy' program (from
" http://www.w3.org/People/Raggett/tidy/) on the current file and
" capturing the error messages so that they can be accessed with
" the Quickfix commands (:cn, et al.). The HTML file itself is
" not modified.
" Usage:
" :Tidy
" ============================================================================

" Avoid loading this file twice or when 'compatible' is set, and allow
" the user to disable loading it.
"
if exists("loaded_tidy") || &cp
finish
endif
let loaded_tidy = 1

command! Tidy call Tidy()

" Use :make to run 'tidy' on the current file.
"
function! Tidy()

" Save previous 'make' options.
"
let ef=&errorformat
let mp=&makeprg

" Set new 'make' options for running 'tidy'.
"
set errorformat=%f:%l:%c:\ %m
set makeprg=tidy\ -e\ --gnu-emacs\ yes

" Do it.
"
execute "make " . expand("%")

" Restore previous 'make' options.
"
let &makeprg=mp
let &errorformat=ef

endfunction
39 changes: 21 additions & 18 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,24 @@ call pathogen#helptags()
set ruler

"Want a different map leader than \
"set mapleader = ",";
"set mapleader = ","

"Ever notice a slight lag after typing the leader key + command? This lowers
"the timeout.
set timeoutlen=500
"the timeout. 500
set timeoutlen=1000

"Switch between buffers without saving
set hidden

"Set the color scheme. Change this to your preference.
"Here's 100 to choose from: http://www.vim.org/scripts/script.php?script_id=625
colorscheme twilight
"twilight / darkEx / anotherdark
colorscheme anotherdark

"Set font type and size. Depends on the resolution. Larger screens, prefer h20
set guifont=Menlo:h14

" set guifont=Menlo:h14
set guifont=Monaco:h12

"Tab stuff
set tabstop=4
set shiftwidth=4
Expand All @@ -52,7 +54,7 @@ call pathogen#helptags()
set number

"Prefer relative line numbering?
"set relativenumber"
"set relativenumber

"Indent stuff
set smartindent
Expand All @@ -62,7 +64,7 @@ call pathogen#helptags()
set laststatus=2

"Prefer a slightly higher line height
set linespace=3
set linespace=2

"Better line wrapping
set wrap
Expand Down Expand Up @@ -95,7 +97,7 @@ call pathogen#helptags()
nnoremap <leader>ft Vatzf
" Create dictionary for custom expansions
" set dictionary+=/Users/jeff_way/.vim/dict.txt
set dictionary+=~/.vim/dict.txt

"Opens a vertical split and switches over (\v)
nnoremap <leader>v <C-w>v<C-w>l
Expand All @@ -118,7 +120,7 @@ call pathogen#helptags()
"Shortcut for editing vimrc file in a new tab
nmap <leader>ev :tabedit $MYVIMRC<cr>
"Change zen coding plugin expansion key to shift + e
"Change zen coding plugin expansion key to Ctrl + e
let g:user_zen_expandabbr_key = '<C-e>'

"Faster shortcut for commenting. Requires T-Comment plugin
Expand Down Expand Up @@ -163,12 +165,13 @@ call pathogen#helptags()
vmap <C-Down> xp`[V`]
" Source the vimrc file after saving it. This way, you don't have to reload Vim to see the changes.
if has("autocmd")
augroup myvimrchooks
au!
autocmd bufwritepost .vimrc source ~/.vimrc
augroup END
endif
" if has("autocmd")
" augroup myvimrchooks
" au!
" autocmd bufwritepost .vimrc source ~/.vimrc
" augroup END
" endif
autocmd bufwritepost .vimrc source $MYVIMRC

" easier window navigation
nmap <C-h> <C-w>h
Expand All @@ -180,13 +183,13 @@ call pathogen#helptags()
"NERDTREE PLUGIN SETTINGS
"------------------------"
"Shortcut for NERDTreeToggle
nmap <leader>nt :NERDTreeToggle <CR>
nmap <leader>nt :NERDTreeToggle<CR>
"Show hidden files in NerdTree
let NERDTreeShowHidden=1

"autopen NERDTree and focus cursor in new document
autocmd VimEnter * NERDTree
"autocmd VimEnter * NERDTree
autocmd VimEnter * wincmd p

"Helpeful abbreviations
Expand Down

0 comments on commit 05d8dbe

Please sign in to comment.