Skip to content

Commit

Permalink
pequeñas mejoras y correcciones
Browse files Browse the repository at this point in the history
  • Loading branch information
jbgutierrez committed May 11, 2012
1 parent c6dc8fd commit 537ac43
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 23 deletions.
4 changes: 2 additions & 2 deletions dotfiles/ackrc
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dotfiles/bash/aliases
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dotfiles/gitconfig
Expand Up @@ -14,7 +14,7 @@
[core]
editor = vim -f
excludesfile = ~/.gitignore
autocrlf = input
autocrlf = false
safecrlf = true
[color]
status = auto
Expand Down
1 change: 0 additions & 1 deletion dotfiles/railsrc
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions dotfiles/vim/plugin/clean_coffee.vim
Expand Up @@ -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)
Expand Down
29 changes: 19 additions & 10 deletions dotfiles/vim/plugin/functions.vim
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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"}}}
14 changes: 10 additions & 4 deletions dotfiles/vimrc
Expand Up @@ -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{{{
Expand All @@ -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
Expand Down Expand Up @@ -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]
"}}}
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions dotfiles/zsh/config
Expand Up @@ -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
Expand Down

0 comments on commit 537ac43

Please sign in to comment.