Permalink
Browse files

pequeñas mejoras y correcciones

  • Loading branch information...
jbgutierrez committed May 11, 2012
1 parent c6dc8fd commit 537ac432fbf95eefaef1a591e161e275ab353512
View
@@ -8,9 +8,9 @@
--pager=less -r
# Custom extensions
---type-add=css=.sass
+--type-add=css=.sass,.scss
--type-add=ruby=.haml,.builder,.rake
---type-set=html=.ascx,.aspx,.Master
+# --type-set=html=.ascx,.aspx,.Master
--type-set=markdown=.markdown,.md,.mdown
--type-set=cucumber=.feature
View
@@ -152,7 +152,7 @@ alias cdrememberme='cd "$REMEMBERME_PATH"'
# List folders size
function dufolders() {
- du -h --max-depth=1
+ du -h -g -d 1
}
# File compression
View
@@ -14,7 +14,7 @@
[core]
editor = vim -f
excludesfile = ~/.gitignore
- autocrlf = input
+ autocrlf = false
safecrlf = true
[color]
status = auto
View
@@ -61,7 +61,6 @@ if ENV['RAILS_ENV'] || defined?(Rails)
include ActionView::Helpers::TagHelper
include ActionView::Helpers::TextHelper
include ActionView::Helpers::TranslationHelper
- Hirb.add_view ActionDispatch::Routing::Route, :class => Hirb::Helpers::Route
# short and long route list
def routes(long_output = false)
@@ -16,13 +16,13 @@ function! CleanCoffee()
" echo vars
for var in vars
if search('^ *' . var . ' =') > 0
- silent! normal ^ivar
+ silent! normal ^ivar
silent! normal G$
endif
endfor
endwhile
- silent! %g/\v\s*return null;/d
+ silent! %s/\vreturn +(.*[(=])/\1/
" Restore caret position
call setpos(".", cursor_position)
@@ -214,14 +214,7 @@ function! s:align()
endif
endfunction"}}}
-" Custom Folding{{{
-function! MyFoldText()
- let line = getline(v:foldstart)
- let sub = substitute(line, '/\*\|\*/\|{{{\d\=', '', 'g')
- let number = v:foldend - v:foldstart + 1
- return sub . ' ... (' . number . ' lines)'
-endfunction"}}}
-
+" Delete buffer without delete window {{{
function! Buflist()
redir => bufnames
silent ls
@@ -230,7 +223,7 @@ function! Buflist()
for i in split(bufnames, "\n")
let buf = split(i, '"' )
call add(list, buf[-2])
-| endfor
+ endfor
return list
endfunction
@@ -241,4 +234,20 @@ function! Bdeleteonly()
endfor
endfunction
-command! BdelOnly :silent call Bdeleteonly()
+command! BdelOnly :silent call Bdeleteonly()"}}}
+
+" Custom Folding{{{
+function! MyFoldText()
+ let line = getline(v:foldstart)
+ let sub = substitute(line, '/\*\|\*/\|{{{\d\=', '', 'g')
+ let ind = indent(v:foldstart) / &tabstop
+ let spaces = ''
+ let i = 0
+ while i < ind
+ let i = i+1
+ let spaces = spaces . ' '
+ endwhile
+
+ let number = v:foldend - v:foldstart + 1
+ return spaces . sub . ' ... (' . number . ' lines)'
+endfunction"}}}
View
@@ -93,6 +93,8 @@ au ColorScheme * hi Search gui=underline guifg=NONE guibg=NONE ctermfg=NONE cter
if has("gui_running")
set cursorline " highlight current line
set cursorcolumn
+else
+ set nospell
endif
set clipboard+=unnamed "accessing the system clipboard"}}}
" mswin settings{{{
@@ -116,8 +118,8 @@ compiler ruby " Enable compiler support for ruby
" au BufWinLeave * mkview
" au BufWinEnter * silent loadview"}}}
" spaces, tabs and DOS text files{{{
-au BufRead * silent! %s/\r$// " never see ^M again! (DOS text files)
-au BufWrite * silent! %s/\v\s+$// " chop off unnecesary tabs and spaces"}}}
+" au BufRead * silent! %s/\r$// " never see ^M again! (DOS text files)
+" au BufWrite * silent! %s/\v\s+$// " chop off unnecesary tabs and spaces"}}}
" folding{{{
set foldlevel=1
set foldmethod=syntax
@@ -162,7 +164,8 @@ au FileType diff setlocal foldlevel=0
au BufReadPost {COMMIT_EDITMSG,*/COMMIT_EDITMSG} set ft=diff"}}}
" coffescript{{{
let coffee_compile_on_save = 1
-au BufWritePost *.coffee silent CoffeeCompile -b | cwindow | redraw!
+" au BufWritePost *.coffee silent CoffeeCompile -b | cwindow | redraw!
+au! BufWritePost,FileWritePost *.coffee :silent !coffee -c <afile>
au BufNewFile,BufReadPost *.coffee setl foldmethod=indent nofoldenable
":[RANGE] CoffeeCompile [watch|unwatch] [vert[ical]] [WINDOW-SIZE]
"}}}
@@ -250,7 +253,7 @@ nmap s "_diw"0P
" vmap s "_d"0P"}}}
" search{{{
" nmap <leader>a :Ack
-nmap + yiw:Ack <c-r>"
+" nmap + yiw:Ack <c-r>"
"}}}
" switch between buffers{{{
nmap <A-tab> :bn<CR>
@@ -316,3 +319,6 @@ endif"}}}
autocmd BufReadPost fugitive://* set bufhidden=delete
nnoremap <F5> :GundoToggle<cr>
+
+" find . -name "*.rb" | xargs file | grep "CRLF" | awk -F: '{print $1}' | xargs gvim
+" bufdo set ff=unix | w
View
@@ -52,8 +52,8 @@ RPROMPT='%U${PR_WHITE}$(git_log)%u${PR_RESET}'
# setopt PRINT_EXIT_VALUE
-setopt CORRECT
-setopt CORRECTALL
+unsetopt CORRECT
+unsetopt CORRECTALL
setopt hist_ignore_dups # ignore duplication command history list
setopt share_history # share command history data

0 comments on commit 537ac43

Please sign in to comment.