Skip to content

Instantly share code, notes, and snippets.

@javier-lopez
Created July 23, 2016 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javier-lopez/ef80c1ec1739dfa2d9340971d69422ed to your computer and use it in GitHub Desktop.
Save javier-lopez/ef80c1ec1739dfa2d9340971d69422ed to your computer and use it in GitHub Desktop.
http://vim-adventures.com/quiz/ Demostración en vivo de la resolución del reto en 75 teclas
@humus
Copy link

humus commented Jul 23, 2016

Control-D en autocomplets de línea de comandos de VIM

@javier-lopez
Copy link
Author

Junit, ant, jmeter

@javier-lopez
Copy link
Author

@humus
Copy link

humus commented Jul 23, 2016

http://www.rappi.com/ Rappi tienda en ruedas o algo así

@javier-lopez
Copy link
Author

@javier-lopez
Copy link
Author

@humus
Copy link

humus commented Jul 23, 2016

Si no tienes llave pública:
ssh-keygen (aceptar todos los defaults)

@humus
Copy link

humus commented Jul 23, 2016

h modeline

@humus
Copy link

humus commented Jul 23, 2016

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

@javier-lopez
Copy link
Author

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

@humus
Copy link

humus commented Jul 23, 2016

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>

@humus
Copy link

humus commented Jul 23, 2016

@javier-lopez
Copy link
Author

@javier-lopez
Copy link
Author

@javier-lopez
Copy link
Author

"usa sudo para guardar un archivo al que no se tengan permisos

noremap SS :%!sudo tee > /dev/null %<cr>

@humus
Copy link

humus commented Jul 23, 2016

Tarea, banda
:h read

@humus
Copy link

humus commented Jul 23, 2016

@javier-lopez
Copy link
Author

@humus
Copy link

humus commented Jul 23, 2016

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