Permalink
Browse files

Adding Javascript Lint + update Readme.md

  • Loading branch information...
1 parent 69bd98e commit 31eec7cfd4625354e4cc8153be6143cdd6bb2b99 Yodi aditya committed Aug 28, 2011
Showing with 56 additions and 18 deletions.
  1. +1 −0 .vim/bundle/javaScriptLint.vim
  2. +24 −10 .vimrc
  3. +31 −8 README.md
Submodule javaScriptLint.vim added at f49995
View
34 .vimrc
@@ -26,7 +26,6 @@ Bundle 'vim-scripts/tComment'
"Files manager
Bundle 'majutsushi/tagbar'
-Bundle 'ervandew/supertab'
Bundle 'scrooloose/nerdtree'
Bundle 'FuzzyFinder'
Bundle 'vim-scripts/mru.vim'
@@ -51,6 +50,7 @@ Bundle 'godlygeek/tabular'
Bundle 'jamescarr/snipmate-nodejs'
Bundle 'wavded/vim-javascript'
Bundle 'lunaru/vim-less'
+Bundle 'joestelmach/javaScriptLint.vim'
" Syntax checking
Bundle 'scrooloose/syntastic'
@@ -180,7 +180,6 @@ set tm=500
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
syntax enable "Enable syntax hl
-set gfn=Monospace\ 9
set shell=/bin/bash
if has("gui_running")
@@ -189,9 +188,11 @@ if has("gui_running")
set background=dark
colorscheme mustang
set nonu
+ set gfn=Monospace\ 9.4
else
set background=dark
- set nonu
+ set gfn=Monospace\ 8
+ set nonu
endif
set encoding=utf8
@@ -316,15 +317,18 @@ map <buffer> <P> :w<CR>:!/usr/bin/php5 % <CR>
" This is from : http://dancingpenguinsoflight.com/2009/02/python-and-vim-make-your-own-ide/
"
-" Toggle line numbers and fold column for easy copying by Pressing F2
-nnoremap <F2> :set nonumber!<CR>:set foldcolumn=0<CR>
+" Toggle line numbers and fold column for easy copying by Pressing F3
+nnoremap <F3> :set nonumber!<CR>:set foldcolumn=0<CR>
" Execute Python file being edited with <Shift> + e:
nnoremap E w:<CR>:!python % <CR>
" Execute NodeJS file being edited with <Shift> + n:
nnoremap N w:<CR>:!node %<CR>
+" Execute javascriptLint vim plugin using <Shift> + j :
+nnoremap J w:<CR>:!JavaScriptLint %<CR>
+
" Set autocomplete form
set completeopt=menuone,longest,preview
@@ -426,11 +430,13 @@ nmap <F8> :call ToggleNERDTreeAndTagbar()<CR>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" FuzzFinder Shorcuts. Using F7 for opening FuzzyFinderTextMate
+" FuzzFinder Shorcuts. Using F2 for opening FuzzyFinderTextMate
map <leader>t :FufFileWithCurrentBufferDir<CR>
-map <F7> :FufFileWithFullCwd<CR>
+map <F2> :FufFileWithFullCwd<CR>
map <leader>b :FufBuffer<CR>
+" MRU shorcuts
+map <leader><space> :MRU<CR>
""""""""""""""""""""""""""""""""""""""""""""
" NERDTree : https://github.com/scrooloose/nerdtree.git
" MODIFYING NERDTree MY CUSTOM
@@ -491,9 +497,9 @@ highlight Pmenu gui=bold
" Configure neocomplcache
" http://www.vim.org/scripts/script.php?script_id=2620
let g:neocomplcache_enable_at_startup = 1
-let g:neocomplcache_enable_smart_case = 1
-let g:neocomplcache_min_syntax_length = 3
+let g:neocomplcache_enable_camel_case_completion = 1
let g:neocomplcache_enable_auto_select = 1
+let g:neocomplcache_min_syntax_length = 4
" Enable omni completion.
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
@@ -511,11 +517,19 @@ let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::'
let g:neocomplcache_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::'
-
if has("gui_running")
highlight SpellBad term=underline gui=undercurl guisp=Orange
endif
" http://stackoverflow.com/questions/1687252/with-vim-use-both-snipmate-and-pydiction-together-share-the-tab-key "
" Change share keys between pydiction and snipmate
"
+"
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""'
+if has("gui_running")
+ " Vimdiff colorscheme
+ highlight DiffAdd cterm=none ctermfg=bg ctermbg=Green gui=none guifg=bg guibg=Green
+ highlight DiffDelete cterm=none ctermfg=bg ctermbg=Red gui=none guifg=bg guibg=Red
+ highlight DiffChange cterm=none ctermfg=bg ctermbg=Yellow gui=none guifg=bg guibg=Yellow
+ highlight DiffText cterm=none ctermfg=bg ctermbg=Magenta gui=none guifg=bg guibg=Magenta
+endif
View
@@ -11,8 +11,10 @@ This VIM is inspired by many great developers that share their custom VIM config
All TLDR; documentation located in .vimrc. You can read and follow link there to see related projects used.
+
Installing
-----------
+
Go to your Command / Terminal :
cd ~/
@@ -35,7 +37,7 @@ Change your TAB behaviour between PyDiction and Snipmate by follow this link :
http://stackoverflow.com/questions/1687252/with-vim-use-both-snipmate-and-pydiction-together-share-the-tab-key
-But i prefer using CTRL+Space as Snipmate Completion by :
+But i prefer using CTRL+Space as Snipmate Completion. Here a how to make it :
vim .vim/bundle/snipmate.vim/after/plugin/snipMate.vim
@@ -53,10 +55,12 @@ Dependencies
After do installing, you should go to VIM and do :BundleInstall. I use Vundle here which i use pathogen in the past development.
-I use nodejs-snipmate and snipmate snippets from honza. So delete /snipmate.vim/snippets for enabling this two snippets update.
+I use nodejs-snipmate and snipmate-snippets. To preventing crash between default snippets in Snipmate and others,
+delete .vim/bundle/snipmate.vim/snippets.
-Also, i install Python Debugger like pyflakes, pylint and pep8.
+
+1. Python Debugger like pyflakes, pylint and pep8
For installing Python debugger using PIP :
@@ -66,29 +70,48 @@ sudo pip install pep8
Read .vimrc for magic keys and guide.
-Also you need Ctags. If you using Ubuntu, then can do this command :
+2. Ctags
+
+If you using Ubuntu, then can do this command :
sudo apt-get install exuberant-ctags
+3. JavascriptLint
+
+This is powerfull Javascript syntax checker with quickfix.
+
+Folow this link for installation guide : http://cisight.com/auto-checking-errors-for-javascript-in-vim/
+
Usage
------
For using this custom VIM, here are some clue :
-1. Use Backspace as PageUp & Space as PageDown
+1. Use Backspace as PageUp & Space as PageDown in normal mode
-2. Use tab in insert mode for autocomplete for Python ( using PyDiction )
+2. Use tab (insert mode) for autocomplete Python using PyDiction
-3. Text Autocomplete every you type. Also you can use CTRL + Space for Omni Completion
+3. Autocomplete every you type. Also you can use CTRL + Space for Snipmate Autocompletion
4. Move to another tab / buffer using CTRL+Arrow
5. Using NERDTree by :NERDTree or editing .vimrc to enable NERDTree automatically.
-6. Using F7 for FuzzFinder in Full Path or <leader>t for open based on current Buffer
+6. Using F7 for FuzzFinder in Full Path or <leader>t (,t) for open based on current Buffer
7. Press F8 for enabling NERDTRee and Tagbar (Love it!)
+8. Use <leader> space for MRU
+
+9. Use Shift+e for execute Python code
+
+10. Use Shift+n for execute NodeJS code
+
+11. Use Shift+j for checking javascript syntax in current file
+
+12. Also check many goodies bag in .vimrc
+
+
Author
-------

0 comments on commit 31eec7c

Please sign in to comment.