Marco Islas Blog

vim

  • Right now




    Right now

    Originally uploaded by markuz



    3:20 in the morning and I'm working, I need to finish a program that I wrote almost a year ago, that was a Demo program and in 4 days (right now just 2) should be production ready!... I'm gonna need a double Monster dosis.

  • Using Ctrl+s to save in Vim


    You can achieve this behavior in gvim, just edit your vimrc, typically located in /home/$user/.vimrc and add the next lines:
    if has("gui_running")
      " If the current buffer has never been saved, it will have no name,
      "
    call the file browser to save it, otherwise just save it.
      :map <silent> <C-S> :if expand("%") == ""<CR>:browse confirm w<CR>:else<CR>:confirm w<CR>:endif<CR>
    endif
     
    Then add this imap to save any time you are typing, with this, you just save as in any other text editor, just Ctrl+s and keep going.
    :imap <c-s> <c-o><c-s>
     
    Source
twitter logo