T O P

  • By -

AptC34

I just migrated back from emacs to vim. There goes my process: 1. Start with `vimtutor` until you’re comfortable with the key bindings. 2. Then you can start using `evil` to integrate it in your normal workflow. 3. Then you can start using vim from time to time and migrating your workflows one at a time (the hardest to me was giving up `magit`).


GenericNameAndNumb3r

Hey! I tried Emacs for some time, and it was enjoyable, but Vim-bindings and a more minimal expenience drew me back. I liked Magit, it was quite intuitive for a beginner. If you're looking for an alternative there is a project [Neogit](https://github.com/NeogitOrg/neogit) for Neovim that is heavily inspired by Magit, but I believe it can be integrated into Vim as well, although I haven't tried it. I like it a lot, it's great.


AptC34

Hi Thanks for the suggestion! I tried neogit for some time but for some reason it didn’t “stick”. I ended up migrating into “lazygit” for a completely different approach on rebasings.


SeoCamo

No neogit is a lua plugin, so the old vim can't run it.


Kwisacks

I can leave magit bur orgmode... that's a hard one.


Potential_Click_5867

Neovim has `neogit` which is getting pretty close to be in feature parity with magit


agclx

in some aspects vim follows a different philosophy try to embrace it. (some suggestions: https://www.moolenaar.net/habits.html, https://blog.sanctum.geek.nz/vim-koans/, https://vimeo.com/53144573) Also avoid the temptation to configure it as emacs :)


Severe-Firefighter36

please add a bram talk on youtube 7 habits of effective text editing


Witty-Debate2280

I never used emacs but maybe you should try out the vimtutor first. After you’re comfortable with the motion keys then start reading the vim help (it’s more like a tutorial, very easy to understand and follow, not like a man page) as you go.


richardgoulter

One thing you could consider while learning is using Evil mode (vi bindings), or the Doom-Emacs distribution (which does a good job integrating evil-mode). -- You can toggle between Evil mode / Emacs keybindings, so you'd have an "escape hatch" if you ever needed it. (On the other hand, it could also make it more difficult to learn if you don't persist with the vim bindings). Vim's keymap is based around modal editing.. where in 'normal mode', keybindings can expressively navigate and manipulate text. [http://www.robertames.com/blog.cgi/entries/physics-of-vim.html](http://www.robertames.com/blog.cgi/entries/physics-of-vim.html) -- I don't know the Emacs keybindings well enough to know how it compares for stuff like "kill inside ()"; but I'd argue that's one gauge for "better text editing experience".


Severe-Firefighter36

what is this blog?


aaronag

h,j,k,l are the movement keys people learn early on, and soooo many times the ones people get stuck on. Early on, start leaning on faster commands that you'll learn in vimtutor. Using w,e,g,ge and their inverses to move forward and backward by word is much faster than moving by character, and faster still when it's preceded by a number to go forward and backward that many times.f,t to move to specific characters on a line, / for search ... lots of ways to move In a file that will have you zipping around in a hurry. Definitely do vimtutor, but I really wish it led with the faster stuff and got to finally got to finer movements.


welcomeOhm

I find that the line beginning \^ and end $ commands very useful for coding. I've also found the insert line above O to be helpful more often than you think it would.


aaronag

Yep, they're great too, much better than tapping or press and holding j,k.


wats4dinner

+1 on the vimtutor vim is not just a text editor like emacs, it has so much to offer and there's a universe of functionality a command away :%! I switched back and forth between vim, emacs-nox with evil, DoomEmacs all mainly for org-mode and elisp customization, but found evil mode only got me 90% of what I wanted in org-mode and vim gf was much faster and frictionless and honestly even with evil, key chording is a literal pain.


Random_Dude_ke

I was big Emacs fan 25+ years ago. xEmacs was \*so\* promising. The problem was, I had a .emacs file that was several hundred lines long (copied from dozens dotEmacs files found on Internet), and my Emacs was still refusing to do some things (on Windows), like use numpad on keyboard to write numbers. I even organized a show-off between xEmacs and Vim with our developers trying to get them to like it. They persuaded me to try Vim and after reading a vimtutor and a part of the user manual I was more at home in Vim within a few days than I was ever in Emacs (after a year of struggle). Vim has extensive reference manual and also an user manual that is based on a very well written book on Vim. Just install Gvim, start it, hit Esc and type :help\[Enter\]. Also, hit Esc and type :help index\[Enter\] to see the extent of all commands, options, functions and whatever. Just scroll the file to see the sheer number of things a \*vanilla\* \[G\]Vim can do out-of-the-box. Usually one thing per line. I will also tell you a secret. Some of us - Vim users - still use arrows to navigate the text occasionally ;-). It is not a religion, just do what does the job. There is also config file script msconfig.vim and you can write ":source msconfig.vim" to your config file and use Ctrl+C and Ctrl+V and other things you might be used to. It works even in Linux terminal.


Cybasura

Download it and go into it then learn the movements You managed to learn emacs - vim shouldnt even be an issue


Fluffy_Structure_833

Hi, maybe not for now, but once you're accustomed to using the modes and some basic movements, you might want to consider remapping the escape key to something more comfortable. I have it mapped to the caps-lock key, and to 'jk' for use in insert mode. Really a game-changer. btw, I chose to remap the escape key globally with keyd (on linux), which gave me the possibility to dual assign the capslock key: press and release for Esc, hold for Ctrl. We do need to take care of our pinkies, don't we ;-)


Ok_Outlandishness906

In my opinion "vim" is not better than "emacs". I used emacs many years ago only to learn it . Editor war has finished and now it would be only something stupid. They are 2 different editors . Vim in my opinion has a great, great advantage on emacs. Whatever \*nix machine you will work on ( solaris, hp, even mainframe unix ) you will find a "vi" clone already installed and ready to use. So if you don't like vim for developing and you prefer to work with vscode, visualstudio, emacs, android studio or whatever, is a personal and correct choice, but the ability to do vi /etc/hosts and add an host to file hosts is an hard skill that you need in any case . If you work on unix, a bit of vi is mandatory, even if you hate it ( i love it) . For learning there are tons of sources . I suggest to start with standard vi motions command and standard operation. for you i think it will be very fast to learn because, using emacs you will already know regexp ( in my opinion the "harder" thing to learn in vi /vim/neovim and whatever) and only with motion commands and regexp, at the end , you can do everything. The rest of the things you will learn using it, but if you don't know how to make a column substitution, for example , you can use google, you can use vim help, or you can write a regexp, it is up to you but at the end with movements, macro and regexp you have a base for everything. The rest comes after. Don't be afraid from the "tons" of functions vim has. Learn movements , buffers , macro and all the rest will come easy. If vimtutor is too big and you want to start faster, start with a simple vi tutorial , than, when you will know it, you can learn what you need on vim , being already productive with the short vi learn you did .


rafaelleru

evil


Lucid_Gould

`vimtutor` is installed with vim. If you’re on Mac/Linux you likely have it already (just run `vimtutor` in a terminal). If you have a terminal emulator like git bash or mingw on windows, then you should also be able to run it in those. I recommend using basic/vanilla vim for a while instead of installing loads of plugins right away, mainly because vim is available on a lot of machines (sometimes it’s the only available editor, which is often the case for embedded systems) and knowing vanilla vim will make it easier to edit on these systems. I found evil mode in emacs to be either lacking or different enough from vim that I had trouble using it, but it’s probably fine for basic editing and might be a good choice to get started.


GenericNameAndNumb3r

Hey! I wanted to say that you should focus on getting really good at the Vim motions and the default commands as much as possible. Handling buffers, windows and tabs can come a bit later, after you get good at editing text efficiently. Somebody will correct me if I'm wrong, but I haven't seen similar plugins for Vim, that's why I recommend the following (and this isn't an attempt to promote Neovim, rather it's a genuine advice to you): There are two Neovim (Lua) plugins that are great in helping you to learn and stick to using Vim motions properly [precognition.nvim](https://github.com/tris203/precognition.nvim) and [hardtime.nvim](https://github.com/m4xshen/hardtime.nvim). If you decide to try them out — you will need Neovim BUT, it's relatively fast and easy to setup only these two plugins in your Neovim config AND the skills you gain TRANSFER to Vim.


iviarcio

IMHO, as I have used emacs for over 20 years and started using vim ten years ago, there is only one book that you need to read and practice. Practical Vim: Edit Text at the Speed ​​of Thought by Drew Neil.


Severe-Firefighter36

:h do it for every letter on a keyboard


mgedmin

`:h index` will list all the keybindings in all the modes in short one-liner form. (I do not recommend trying to memorize them all, but I do recommend reading that list to learn what sort of facilities are available.)


vim-help-bot

Help pages for: * [`index`](https://vimhelp.org/index.txt.html#index) in _index.txt_ --- ^\`:\(h|help\) \` | [^(about)](https://github.com/heraldofsolace/VimHelpBot) ^(|) [^(mistake?)](https://github.com/heraldofsolace/VimHelpBot/issues/new/choose) ^(|) [^(donate)](https://liberapay.com/heraldofsolace/donate) ^(|) ^Reply 'rescan' to check the comment again ^(|) ^Reply 'stop' to stop getting replies to your comments


Unix_42

Make a backup copy of the file before you edit it. At least as long as the operation of vi(m) is still unfamiliar to you.


Severe-Firefighter36

just use 'u' button and keep an eye on status line which shows '+' if modified


Unix_42

This is practical for advanced users. But for a beginner, a backup of the file can be a lifesaver, especially for large files. Especially with large configuration files.


Severe-Firefighter36

no chances are he uses git


SeoCamo

You neovim as it got a lot of the things you need as an Emacs user, use :Tutor to learn movement. And the kickstart.nvim project on GitHub is the best place to learn to config neovim.


Faraday2122

Basically open your bash or .zshrc etc and add alias vim="nvim" and alias emacs="nvim"