• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics with the tag "vim". Back to normal view
    1. Help me understand vim motions

      I use vim on remote servers or on my machine to edit single files. I, however, use it in a very basic sense, I do not use any vim motions. I enter edit mode, I change what I need to change, exit...

      I use vim on remote servers or on my machine to edit single files. I, however, use it in a very basic sense, I do not use any vim motions. I enter edit mode, I change what I need to change, exit edit mode and save and quit, that's it.

      Recently, I've been looking for alternatives to Visual Studio Code as Microsoft is starting to push Copilot very heavily and while I could use a cleaned up fork, the other concern is with more and more essential extensions becoming closed source and subject to Microsoft's licensing. And vim is a text editor that pops up over and over when I ask for recommendations.

      A few days ago I've listened to No Boilerplate's Writing at the Speed of Thought which brings up a point about vim and vim motions being designed around the human body and how "editing by letters is extremely unnatural ... [and] extremely ill-suited to our nature".
      That just doesn't sit well with me and may be the reason why vim never fully clicked with me. For context, I've been using computers in some capacity since a very early age, so perhaps the 'unnatural' way I've learned is so ingrained that I just can't make the switch, maybe I just think about things in a way that is more computer-centric just due to that as well.

      I am still on my quest to replace VSCode and I would love to make a switch to something that's less attached to a single corporation that can pull the rug from under me at any time. A part of that quest I guess turned out to be trying to understand vim and maybe finally making it click for me, so I turn to the wonderful community of Tildes for help :)

      Thank you

      22 votes
    2. TIL that in vim, you can press <C-Tab> (or g<Tab>) to jump to the last accessed tab page

      Previously I used to have this in my .vimrc: if !exists('g:lasttab') let g:lasttab = 1 endif nmap <C-Tab> :exe "tabn ".g:lasttab<CR> au TabLeave * let g:lasttab = tabpagenr() Courtesy of:...

      Previously I used to have this in my .vimrc:

      if !exists('g:lasttab')
        let g:lasttab = 1
      endif
      nmap <C-Tab> :exe "tabn ".g:lasttab<CR>
      au TabLeave * let g:lasttab = tabpagenr()
      

      Courtesy of: https://stackoverflow.com/a/2120168

      But while going through the help docs today, I stumbled across this mapping and am glad to find that this now exists by default. When it got added, however, I don't know.

      18 votes
    3. What is your personal preference and why: vim or emacs?

      This is of course the age old debate, which on other sites has been known to quickly devolve (one of the Internet ‘holy wars’ of yore). Nonetheless, I am curious. I personally use vim. Part of the...

      This is of course the age old debate, which on other sites has been known to quickly devolve (one of the Internet ‘holy wars’ of yore). Nonetheless, I am curious.

      I personally use vim. Part of the reason is surely that it is just the first one of the two that I happened to use, and thus by the time I tried emacs I was used to vim. But more broadly, I enjoy using vim because once you get over the hump of ‘weird’ commands and modes, I feel that vim most closely emulates the feelings and thought process that you have when building something with your hands. You can pick up different tools, yank pieces out and rearrange them, turn the object around in your hands to see different parts, etc etc. Once you internalize the movement and editing you really start flying around. At that point the interface seems less like a barrier between you and the text and more like a way to ‘hold’ it.

      Of course, people have different preferences.

      15 votes