Created
July 23, 2016 19:03
-
-
Save javier-lopez/ef80c1ec1739dfa2d9340971d69422ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://vim-adventures.com/quiz/ Demostración en vivo de la resolución del reto en 75 teclas |
Mini tweak de Ctrl-P, no usar carpeta actual, sino carpeta del archivo que se está editando. Depende de dbakker/vim-projectroot
nnoremap <silent> <C-p> :call CtrlPWhatTodoWhenCtrlpIsCalled()<cr>
nnoremap <silent> <C-n> :CtrlPMRU<cr>
let g:ctrlp_map = '<F13>'
fun! CtrlPWhatTodoWhenCtrlpIsCalled() "{{{
let actual_dir = getcwd()
let dir = projectroot#get()
if dir != ''
CtrlPMixed
elseif expand('%:t') == ''
CtrlPMRU
else
execute 'CtrlP ' . expand('%:p:h')
endif
endfunction "}}}
let g:filesep=!has('win32') ? '/' : '\'
noremap! %% <C-r>=expand('%:h') . g:filesep<cr>
Abrir archivo en la línea en la que lo dejaste:
" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal! g'\"" | endif
endif
utilizar los mismos directorios de configuración en windows/linux
if has('win32') || has('win64')
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/.vim/after
endif
Ejecutar la línea de vimscript que está en el cursor con el mapeo ygl (mnemónico _Y_ou _G_et _L_ine):
nnoremap ygl :<C-u><C-r>=getline('.')<cr><cr>
"usa sudo para guardar un archivo al que no se tengan permisos
noremap SS :%!sudo tee > /dev/null %<cr>
Tarea, banda
:h read
Un proyecto java usando maven, spring mvc y pebble templates:
https://github.com/humus/dalist
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
h modeline