Skip to content

Instantly share code, notes, and snippets.

View fmoralesc's full-sized avatar

Felipe Morales fmoralesc

  • Leuven, Belgium
View GitHub Profile
@fmoralesc
fmoralesc / vim_acme_prototype1.vim
Created June 21, 2014 14:45
acme middle mouse double target prototyppe
noremap <MiddleMouse> <nop>
noremap <MiddleRelease> :call AcmeMiddle()<cr>
function! AcmeMiddle() range "{{{2
let star=getreg("*")
exe "normal \<leftmouse>"
let cw=expand("<cWORD>")
let s_f_line = split(star, "\n")[0]
let f_line = getline(a:firstline)
let s_f_byte = line2byte(a:firstline + stridx(f_line, s_f_line))
@fmoralesc
fmoralesc / juanamolina.txt
Created July 11, 2014 20:25
juana molina y las influencias - draft
% Juana Molina y las influencias
% Felipe Morales
¿Qué significa que un artista tenga una influencia? ¿Qué significa que un
artista reconozca una influencia? ¿Qué significa que un artista *no* reconozca
una influencia?
Juana Molina ha dicho, tratando de explicar su éxito fuera de Argentina, que lo
que hace "no se parece a nada"[^1], y esta expresión se ha repetido bastante en
los medios, y en la opinión de los fans. Sin embargo, uno puede apreciar en su
@fmoralesc
fmoralesc / windows.vim
Created September 3, 2014 20:53
get current windows.
function! WindowsData()
let data = []
let i = 1
let i_win_width = winwidth(i)
let i_win_height = winheight(i)
while i_win_width != -1 || i_win_height != -1
call add(data, {'nr': i, 'width': i_win_width, 'height': i_win_height})
let i += 1
let i_win_width = winwidth(i)
let i_win_height = winheight(i)
@fmoralesc
fmoralesc / convert.vim
Created January 11, 2015 16:26
vim function to make conversions
function! Convert(pat, factor, orig_unit, conv_unit) range abort
try
execute a:firstline.','.a:lastline. 's/\('.a:pat.'\)\ze\s\?'.a:orig_unit. '/\=submatch(1)*'.string(a:factor).'/g'
execute a:firstline.','.a:lastline. 's/'.a:orig_unit. '/'.a:conv_unit.'/g'
catch
endtry
endfunction
@fmoralesc
fmoralesc / indentuntil.vim
Created January 11, 2015 20:32
indentuntil
function! g:IndentUntil()
let c = getchar()
let indent = stridx(getline(line('.')-1), nr2char(c))
if indent > 0
let c_indent = indent-indent('.')
if c_indent > 0
exe "normal 0i\<space>\<esc>".(c_indent-1)."."
else
let dedent = abs(c_indent)
exe 'substitute/^\s\{'.dedent.'}//'
using Gtk;
using Gdk;
using Posix;
enum OperationMode {
GET,
SET
}
enum SelectionKind {
> neovim git:(fix-resize) gdb ./build/bin/nvim
GNU gdb (GDB) 7.9.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
@fmoralesc
fmoralesc / neovim-files.txt
Created August 29, 2015 20:31
neovim files
/usr/bin/
/usr/bin/nvim
/usr/share/licenses/
/usr/share/licenses/neovim-git/
/usr/share/licenses/neovim-git/LICENSE
/usr/share/man/man1/nvim.1.gz
/usr/share/nvim/
/usr/share/nvim/runtime/
/usr/share/nvim/runtime/autoload/
/usr/share/nvim/runtime/autoload/ada.vim
" Base {{{1
"
if has("nvim")
if !exists('$TMUX')
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
endif
let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1
set shell=fish
endif
@fmoralesc
fmoralesc / sendmail.vim
Created April 22, 2010 19:49
a vim script for sending emails
if (exists("g:loaded_sendmail") && g:loaded_sendmail) || &cp
finish
endif
let g:loaded_sendmail = 1
command! -complete=custom,ListAddresses -nargs=1 Email exec('py sendmail_email("<args>")')
fun ListAddresses(A,L,P)
return system("(grep -o '84=[[:alnum:]+\.\_\-]*@[[:alnum:]+\.\_\-]*' ~/.thunderbird/*.default/abook.mab && cat /home/felipe/.vim/plugin/sendmail.addresslist) | sed -s 's/84=//' | sort | uniq -u")