Permalink
Browse files

Update vimrc and snippets

  • Loading branch information...
1 parent 4ec152d commit 8ead076d034691081eacead70fd6450b154dd217 @graudeejs committed Nov 3, 2011
View
@@ -48,8 +48,8 @@ Perl=*.pl *.PL *.pm *.pod
PostScript=*.ps *.pfa *.afm *.eps *.epsf *.epsi *.ai *.ppd
Python=*.py *.pyw
Qt=*.moc *.qmake *.ui *.ts <C++>
-Ruby=*.rb *.rbw *.gem *.gemspec [rR]akefile *.erb *.rhtml <Haml>
-RubyOnRails=*.builder *.rxml *.rjs <Ruby>
+Ruby=*.rb *.rbw *.gem *.gemspec [rR]akefile *.erb *.rhtml
+RubyOnRails=*.builder *.rxml *.rjs <Ruby> <Haml>
SQL=*.sql *.sqlj *.msql *.mysql *.pls *.plsql *.zsql
Scheme=*.scm *.ss
Shell=*.sh *.bash *.ebuild *.ksh *.tcsh *.cmd *.bat
View
@@ -1,4 +1,4 @@
-ALL_PLUGINS=supertab coffeescript ctrlp ack nerdcommenter fugitive rails fuzzyfinder easytags ultisnips clang_complete vcscommand gitv matchit easygrep statline
+ALL_PLUGINS=supertab coffeescript ctrlp ack nerdcommenter fugitive rails fuzzyfinder easytags ultisnips clang_complete vcscommand gitv matchit easygrep statline dbext
DEFAULT_PLUGINS=supertab ctrlp ack nerdcommenter fugitive fuzzyfinder easytags ultisnips matchit easygrep statline commandt
BUNDLE_DIR=${HOME}/.vim/bundle
@@ -58,6 +58,9 @@ easygrep:
statline:
./github_plugin_update.sh millermedeiros/vim-statline
+dbext:
+ ./github_plugin_update.sh bogdan/dbext
+
helptags:
./update_tags.sh
View
@@ -0,0 +1 @@
+setlocal commentstring=#%s
View
View
@@ -1 +0,0 @@
-" set cursorcolumn
View
@@ -13,14 +13,14 @@ snippet datez
`!v strftime("%Y-%m-%d %H:%M:%S %z")`
endsnippet
+snippet ts
+vim: set ts=${1:4} sw=${2:$1}${3: MORE OPTIONS}:$0
+endsnippet
+
snippet ddate
`!v strftime("%B %d, %Y")`
endsnippet
snippet sdate
`!v strftime("%Y.%m.%d")`
endsnippet
-
-snippet ts
-vim: set ts=${1:4} sw=${2:$1}${3: MORE OPTIONS}:$0
-endsnippet
View
@@ -1 +1,14 @@
-extends html, ruby, rails
+extends html, ruby
+
+snippet partial
+render :partial => "${1:partial_name}"${2:, :locals => \{ ${3:locals} \}}${4:, :layout => false}
+endsnippet
+
+snippet t
+I18n.t('`!v substitute(substitute(substitute(@%, substitute(getcwd() . "/", "\/", "\\\\/", "g"), "", ""), "\\(\\.\\(html\\|js\\)\\.\\(haml\\|erb\\)\\|\\(_controller\\)\\?\\.rb\\)$", "", ""), "/", ".", "g")`.${2:${1/[^\w]/_/g}}${3}', :default => "${1:some_text}"${4})${5:$0}
+endsnippet
+
+snippet html
+$('#${2:page_body}').html('#{escape_javascript(render :partial => '${1:new}', :layout => false)}');${3:$0}
+endsnippet
+
View
@@ -0,0 +1,52 @@
+snippet env
+\begin{${1:environment}}
+ $0
+\end{$1}
+endsnippet
+
+snippet figure
+\begin{figure}[${1:H}]
+ \centering
+ \includegraphics[${2:width}=${3:180}mm,keepaspectratio=true]{${4:image.png}}
+ \caption{${5:Image description}}
+ \label{${6:img-$4}}
+\end{figure}
+$0
+endsnippet
+
+snippet description
+\begin{description}
+ \item[1] --- ${1:some description}
+ $0
+\end{description}
+endsnippet
+
+snippet itemize
+\begin{itemize}
+ \item \textbf{${1:some item}} ${2:description}
+ $0
+\end{itemize}
+endsnippet
+
+snippet enumerate
+\begin{enumerate}
+ \item ${1:description}
+ $0
+\end{enumerate}
+endsnippet
+
+snippet sec
+\section{${1:title}}
+ $0
+endsnippet
+
+snippet subsec
+\subsection{${1:title}}
+ $0
+endsnippet
+
+snippet subsubsec
+\subsubsection{${1:title}}
+ $0
+endsnippet
+
View
@@ -1,4 +1,4 @@
-# extends ruby
+extends ruby
snippet defc
# ${2:MATCH} /${3:controller}/${4:path/}$1
@@ -30,5 +30,12 @@ snippet html
$('#${2:page_body}').html('#{escape_javascript(render :partial => '${1:new}', :layout => false)}');${3:$0}
endsnippet
+snippet attr "attr_accessible"
+attr_accessible :${1:attr_names}
+endsnippet
+
+snippet attr "attr_protected"
+attr_protected :${1:attr_names}
+endsnippet
# vim: set ts=2 sw=2 expandtab:
View
@@ -1,4 +1,4 @@
-extends sh_like_comments, rails
+extends sh_like_comments
snippet #!
#!/usr/bin/env ruby
@@ -62,35 +62,29 @@ else
end${6:$0}
endsnippet
-snippet eif
-elsif ${1:condition}
- ${2:# TODO$0}
-end
-endsnippet
-
-snippet else
-else
- ${1:# TODO$0}
+snippet f
+def ${1:function_name}${2: (${3:args})}
+ ${4:# TODO$0}
end
endsnippet
-snippet f
-def ${1:function_name args}
- ${2:# TODO$0}
+snippet def
+def ${1:function_name}${2: (${3:args})}
+ ${4:# TODO$0}
end
endsnippet
snippet defi
-def initialize
- ${1:# TODO$0}
+def initialize${1: (${2:args})}
+ ${3:# TODO$0}
end
endsnippet
snippet defr
-def ${1:function_name_and_args}
- ${2:# TODO}
+def ${1:function_name}${2: (${3:args})}
+ ${4:# TODO}
rescue
- ${3:# TODO}
+ ${5:# TODO}
end
endsnippet
@@ -106,28 +100,27 @@ end${5:$0}
endsnippet
-snippet each
-each { |${1:element}| ${2:# TODO} }${3:$0}
+snippet .each "each" i
+.each { |${1:element}| ${2:# TODO} }${3:$0}
endsnippet
-snippet Each
+snippet .Each "each" i
each do |${1:element}|
${2:# TODO}
end${3:$0}
endsnippet
-snippet eachpair
-each_pair { |${1:key}, ${2:value}| ${3:# TODO} }${4:$0}
+snippet .eachpair "each_pair" i
+.each_pair { |${1:key}, ${2:value}| ${3:# TODO} }${4:$0}
endsnippet
-snippet Eachpair
-each_pair do |${1:key}, ${2:value}|
+snippet .Eachpair "Each_pair" i
+.each_pair do |${1:key}, ${2:value}|
${3:# TODO}
end${4:$0}
endsnippet
-
snippet until
until ${1:expression}
${2:# TODO}
@@ -164,6 +157,18 @@ snippet rw
attr_accessor :${1:attr_names}
endsnippet
+snippet attr "attr_reader"
+attr_reader :${1:attr_names}
+endsnippet
+
+snippet attr "attr_writer"
+attr_writer :${1:attr_names}
+endsnippet
+
+snippet attr "attr_accessor"
+attr_accessor :${1:attr_names}
+endsnippet
+
snippet begin
begin
View
@@ -0,0 +1 @@
+extends plaintex
View
23 vimrc
@@ -96,7 +96,7 @@ endif
set background=dark
if MY_TERM == 'xterm'
- set t_Co=16
+ " set t_Co=16
endif
" let g:pathogen_disabled = [] " disabled vim scritps
@@ -114,7 +114,7 @@ if MY_TERM == ''
set lazyredraw
endif
-set vb t_vb=
+" set vb t_vb=
"set expandtab
"set foldmethod=syntax
@@ -210,10 +210,12 @@ let g:Tlist_Show_Menu = 1
" nerd commenter plugin
let g:NERDDefaultNesting = 1
-let g:NERDMenuMode = 1
+let g:NERDMenuMode = 0
let g:NERDSpaceDelims = 1
let g:NERDBlockComIgnoreEmpty = 0
let g:NERDCommentWholeLinesInVMode = 1
+let g:NERDBlockComIgnoreEmpty = 0
+let g:NERDCreateDefaultMappings = 0
" FuzzyFind plugin
let g:fuf_timeFormat = '(%Y.%m.%d %H:%M:%S)'
@@ -283,12 +285,13 @@ let g:statline_fugitive = 1
let g:statline_filename_relative = 1
" EasyGrep plugin
-" let g:EasyGrepFileAssociations = $HOME . '/.vim/EasyGrepFileAssociations'
-" let g:EasyGrepMode = 2
-" let g:EasyGrepEveryMatch = 1
-" " let g:EasyGrepSearchCurrentBufferDir = 0
-" " let g:EasyGrepInvertWholeWord = 1
-" let g:EasyGrepFileAssociationsInExplorer = 1
+let g:EasyGrepFileAssociations = $HOME . '/.vim/EasyGrepFileAssociations'
+let g:EasyGrepMode = 2
+let g:EasyGrepEveryMatch = 1
+let g:EasyGrepSearchCurrentBufferDir = 0
+" let g:EasyGrepInvertWholeWord = 1
+let g:EasyGrepFileAssociationsInExplorer = 1
+let g:EasyGrepRecursive = 1
" MISC
if filereadable('/usr/local/bin/exctags')
@@ -460,6 +463,6 @@ nnoremap gTl :OpenURL http://termini.lv/?lang=LV&Meklēt=Meklēt&terms=<cword><C
nnoremap gTr :OpenURL http://termini.lv/?lang=RU&Meklēt=Meklēt&terms=<cword><CR>
colo universal-blue
-
+set vb t_vb=
" vim: set ts=4 sw=4 textwidth=0:

0 comments on commit 8ead076

Please sign in to comment.