79
Comments
  • 4
    Ohhhhh. What happened?
  • 7
    ... and being humbled by its ubiquity and POWER

    Best case scenario, that is. I've definitely found it handy to know the basics, but it does take time to learn. Be strong!
  • 5
    I've been using Vim since February. And I still don't know how to copy and paste between vim files. I googled it, tried it, it worked, then I forget again.

    Anyone know how to set up your own hotkeys instead?
  • 3
    @agentQ you have to edit .vimrc in your home folder
  • 2
    @WildOrangutan do I edit .vimrc in... VIM? Just kidding. Thanks for the pointer. I'll have a look see.
  • 3
    @agentQ

    Follow a tutorial to edit some basic Vimrc rules. Then browse through github searching for other people's configs, copying items you like. Don't copy a whole config without understanding what it does.

    Then install vimplug (in my opinion the best plugin manager), and browse https://vimawesome.com for useful plugins. Install, config and learn to use them one by one to not overwhelm yourself with new stuff.
  • 1
    You can ONLY have a first time in vim
  • 4
    In your CLI type vimtutor
    This is installed by default with vim.
    man vim or man any package (on linux) gives a manual
  • 1
    @bittersweet thanks for the tip
  • 2
    @agentQ all you actually have to remember is that yank (y) copies selection into register and paste (p) pastes it. To choose the registry use "<registry-name>y (or p). System clipboard is * (or +).

    You can quite easily create new keyboard mappings in your ~/.vimrc, for example

    " ctrl-c to copy system clipboard
    vmap <C-c> "*y
    " ctrl-x cut to system clipboard
    vmap <C-x> "*c
    " ctrl-v paste and override current selection
    vmap <C-v> c<ESC>"*p
    " ctrl-v (insert mode) paste (mapping will first exit insert, paste the text using "*p and then return to insert mode right after your text
    imap <C-v> <ESC>"*pa

    Keep in mind that ctrl-v is also used for block selection, which means you might need to choose a different shortcut.
  • 2
    @QueenMorgana just trying to figure out how to use the damn thing. It's so configurable and there's so much it can do.
  • 0
    In case you are still using it, try esc and then type :wq
    I wish you good luck and may you be with us soon!
  • 0
    Good luck!
  • 1
    Do you have an update on you're vim experience?
    Or did you :q already 😜
  • 0
    @Triskelion you mean :q! ?
  • 1
    @gberginc
    This only happens when your in root without sudo
Add Comment