Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> So what kind of stuff do you program inside of it? What kinds of problems do you solve?

It's not always about programming. It's about configuring and extending to suit it to your problem.

Pylinting and running python code. ,c(mapped to :make, not shown here) to pylint(not need as I run syntastic but still), ,x to run

    augroup python
        au!
        autocmd FileType python nnoremap<buffer> ,x :w<CR>:!/usr/bin/env python % <CR>
        autocmd FileType python setlocal nosmartindent
        autocmd FileType python setlocal makeprg=pylint\ --reports=n\ --output-format=parseable\ %:p
        autocmd FileType python setlocal errorformat=%f:%l:\ %m
        autocmd BufRead python setlocal efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m
        autocmd FileType python setlocal path+=$PYTHONDIRS
      augroup end
ERB and Jinja2 shortcuts. \1 for <% {cursor_here} %>, \2 for <%= {cursor_here} %> etc

    inoremap \1 <%<Space><Space>%><Esc>2hi
    inoremap \2 <%=<Space><Space>%><Esc>2hi
    inoremap \3 {%<Space><Space>%}<Esc>2hi
    inoremap \4 {{<Space><Space>}}<Esc>2hi
A mini calculator function, lots of snippets, some saved macros etc.

It's not about changing keyboard shortcuts. It implies you can only remap what already exists. It's about giving you infinite canvas to paint on. This isn't unique to Vim. I am just saying having the capability to do so is important.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: