3 ms·
I've been using vim for ~8 years now as my editor at work. I don't even use the "fancy" movements that everyone always brags about. It's still way more convenie
by war1025 6y ago
I've been using vim for ~8 years now as my editor at work. I don't even use the "fancy" movements that everyone always brags about. It's still way more convenient to move around in than any other editor I've used.
I don't know where I saw it, but the idea that "Code exists to be read" really resonates with me. I don't care how fast I can crank out code. I care about how efficiently I can hop around from place to place to grok what is going on and how it needs to change.
The killer feature of vim that I feel like very few people know about is it's remote editor feature.
Launch a long lived instance of vim with a `servername` set, for example I do: `vim --servername EDITOR`
Then set up a application shortcut that will open the file using the prefix `vim --servername EDITOR --remote <file>`
When you open a file, it gets opened in your single vim instance.
From there you can navigate between all your open files using `:b <file-tab-complete>`
It's really a joy to use. You don't have the mess of tabs where you run out of space super fast, you just have a bunch of open files that you can switch between super easily by name.
- RMPR 6y ago>The killer feature of vim that I feel like very few people know about is it's remote editor feature. Now this is dope, I used to rely on a trick I discovered in a conference[0], append to the `path` variable in your .vimrc so you can recursively fuzzy find files in the directory where you opened Vim, and more recently setting global marks[1] in the files of interest. 0: https://youtube.com/watch?v=XA2WjJbmmoM https://youtube.com/watch?v=XA2WjJbmmoM 1: https://vim.fandom.com/wiki/Using_marks https://vim.fandom.com/wiki/Using_marks
- not_kurt_godel 6y agoThis just sounds like a nightmare to me. I can't stand it when I have a terminal program with an unseeable list of files/panes that have to be opaquely navigated through. I very much want to be one of those vim/emacs ninjas but I just don't see how this is more ergonomic than Jetbrains where any file - not just 'open' ones - is readily available with all sorts of search methods with a single shortcut. And then I can visually see what files I'm working with instead of groping around through one file at a time in the dark.
- alwillis 6y agoVim can operate like that if you want. Most people use NerdTree to have all of their files visible like most IDEs: https://code.tutsplus.com/tutorials/vim-essential-plugin-nerdtree--net-19692 https://code.tutsplus.com/tutorials/vim-essential-plugin-ner...
- war1025 6y ago> I just don't see how this is more ergonomic than Jetbrains where any file - not just 'open' ones - is readily available with all sorts of search methods with a single shortcut. I would guess the difference is that I use a separate terminal window for all of that stuff. I have my desktop split into three main workspaces. The first has my terminal, the second my browser, the third my editor. I have two more workspaces just in case, but they rarely get used. I have shortcuts set up to hop between workspaces using `<super><workspace number>`. If I want to track through where something is used or defined, `git grep` usually gets me what I want. From there, if there is a file I want to look at, I use my shortcut `go <filename>` to open it. This used to be an alias for `gnome-open`, but a couple years ago they switched it to `xdg-open` . It opens the file with whatever program would open it when opening it from the file browser, which for any text file is my vim instance over in workspace 3. I don't pay much attention to which files are open or not. Usually I build up a working set of files I care about pretty quickly and then I can hop between them from within vim. Otherwise I can easily go back over to my terminal and open it by name directly. It may not be for you, but it's far from a nightmare in my experience.
- not_kurt_godel 6y ago> It may not be for you, but it's far from a nightmare in my experience. Right, everyone has their preferences. As was said in another comment, merely paying attention to and adapting one's personal tooling is a huge differentiator between software developers, regardless of which particular tools those might be. Your setup has a lot of conceptual similarities to mine. I use terminals heavily, but ultimately I personally like a GUI as the 'root' of my working space. I'd rather start from a place where I can navigate everything visually/spatially and then add shortcuts on top of that to automate the most repetitive/tedious paths that naturally occur in that environment.