There are some Vim plugins I don't know how I lived without before I found them. One I found just last week is Align, which turns this:
@label = Label.new(@frame, -1, "Choose an option:", DEFAULT_POSITION, DEFAULT_SIZE, ALIGN_CENTER)
@selector = ListBox.new(@panel, -1, DEFAULT_POSITION, DEFAULT_SIZE, [], LB_SINGLE)
@button = Button.new(@frame, -1, 'OK')
into this:
@label = Label.new (@frame, -1, "Choose an option:", DEFAULT_POSITION, DEFAULT_SIZE, ALIGN_CENTER)
@selector = ListBox.new(@panel, -1, DEFAULT_POSITION , DEFAULT_SIZE , [] , LB_SINGLE)
@button = Button.new (@frame, -1, "OK")
These mappings are helpful to quickly align some visually-selected lines of code by comma, left paren or equal sign:
vmap <silent> <Leader>i= <ESC>:AlignPush<CR>:AlignCtrl lp1P1<CR>:'<,'>Align =<CR>:AlignPop<CR>
vmap <silent> <Leader>i, <ESC>:AlignPush<CR>:AlignCtrl lp0P1<CR>:'<,'>Align ,<CR>:AlignPop<CR>
vmap <silent> <Leader>i( <ESC>:AlignPush<CR>:AlignCtrl lp0P0<CR>:'<,'>Align (<CR>:AlignPop<CR>
Speak Your Mind
Preview
Commenting Help
Email / Avatar
No HTML allowed!
All HTML is auto-escaped. Use Markdown. Examples:
code in backticks