DEV Community

Cover image for I'm switching to vim!
Siddharth
Siddharth

Posted on • Updated on

I'm switching to vim!

UPDATE: There are a lot of Vim tips in the comments. Check them out!

I just took a short look at the (neo)vim docs, and I'm officially moving to (neo)vim (and tmux)! I have just used it for a few days, but I really can feel the power it gives me. Not to mention that it really saves my 6GB ram for other uses.

A snapshot of my coding session

And I encourage all of you to do the same. It really is super faster (I come from vscode, and it is really faster). Vim has everything you need – Syntax highlighting, Split screen, File explorers(!), Autocomplete(!), Tabs, Folding lines(!), Indentation autofixing(!), macros, line bookmarks, integrated terminal like interface and what not (I should make an article on it soon). Vim is basically equivalent to VSCode for me.

Latest comments (140)

Collapse
 
yurenchen profile image
yurenchen • Edited

Image description

LunarVim is powerful, and out-of-box.
//for beginner: just press space call for popup-menu

BTW, is there any bookmark extensions?

Collapse
 
siddharthshyniben profile image
Siddharth

Check out marks :help mark-motions, they are builtin minimal bookmarks. I use a plugin which enhances marks: marks.nvim.

If you really want bookmarks, check out vim-bookmark. There are many others, and integrations too. A quick google search will help you find them.

Collapse
 
klvenky profile image
Venkatesh KL

Hey all,

I've just seen that neovim 0.5 is now released(4 days back). We can try out the LSP quite easiy as per the docs.

People who are not interested in nightly versions(like me, atleast for vim) can go & give it a shot.

Collapse
 
mafflerbach profile image
mafflerbach • Edited

I see quite often in the comment "here you can use my dotfiels, vimrc etc" At this point i would recoment to take a peak in the conf, but not blindly use them, I dont linke spaceVim either. I ve added plugins, when i needed it, and not because they sound maybe usefull. If I noticed i use features often, but have to type much i create a mapping for it.
eg:

" ripgrep for the current word/WORD under cursor  
noremap <leader>a :Rg <C-r>=expand('<cword>') <CR>
noremap <leader>A :Rg <C-r>=expand('<CWORD>') <CR>

" yank in WORD into register a s or q
map <leader>1 "ayiW
map <leader>2 "syiW
map <leader>3 "qyiW

" using resgister a and s for search and replace
map <leader>rp :%s/<C-R>a/<C-R>s/g
Enter fullscreen mode Exit fullscreen mode

also strg+f in comand node is very helpfull, if you want to alter a command from the history or th ecurrent one.

You workflow has to develop and will change over the time as well you vimrc will. I compare the vimrc to underware. Its your underware, which fits to you, and you don't realy want, that somebody else shit in it.

Collapse
 
originalix profile image
Leon

I'm not use vim in terminal. By vim mode in every IDE which I use. 😊

Collapse
 
burakcank profile image
Can Kahraman

I humbly suggest anyone to do their own research. Sometimes we get the idea about a tool that will sky-rocket our productivity. Everyone is free to use what they prefer, but I honestly think vim is unintentionally thought as a must-have tool of a developer. It's not. Try it out, give it some time, because it has a steep learning curve, nobody denies it. If that does not suit you, keep moving on with your previous editor and don't get discouraged. There will always be pros and cons of different editors. Stick with the one you prefer and know that it is only necessary to switch your editor when you actually need to.

Collapse
 
siddharthshyniben profile image
Siddharth

I have experienced this a billion times, but vim seems good for me

Collapse
 
lepinekong profile image
lepinekong

problem is all tutorials suck I haven't found one single one that suits me ;)

Collapse
 
siddharthshyniben profile image
Siddharth

I could try to write one. Beginners are better at explaining beginner stuff

Key word: try.

Collapse
 
lepinekong profile image
lepinekong

already tried and gave up :)

Collapse
 
ston1x profile image
Nicolai Stoianov • Edited

Congrats!
I've been using a similar setup for 3 years now. Still can't switch to things like RubyMine or VSCode, mostly due to the ease of navigation with (neo)vim and the mappings I'm used to. They're much more intuitive, mnemonic and personalised than things like command + shift + control + F12.

Collapse
 
siddharthshyniben profile image
Siddharth

Yeah, the keyboard shortcuts are really hard to remember because most IDEs don't have a concept of modes

Collapse
 
brandonwallace profile image
brandon_wallace • Edited

If you consider the UI to be ugly add a color scheme. There are a ton of them available. One popular color scheme is called Molokai. This repository, all by itself, has 128 color schemes available!!

github.com/chriskempson/base16-vim...

Just copy all the *.vim color schemes into your ~/.vim/colors/ directory. Try the color schemes in Gvim and Vim to see how they look. Also you can add a custom font like Hack font or a font you have installed on your system .

Collapse
 
alexisfinn profile image
AlexisFinn

just BTW, in case someone is wondering, the number one reason Vim makes you faster and feels better is that it forces you to learn touch-typing and to rely on keyboard shortcuts.

But the truth is (and I love vim mind you) if you learned/remapped your keyboard shortcuts on pretty much any other editor, you'd attain the same efficiency. Just as a tiling window manager will make a standard desktop environment feel cumbersome because you have to use the mouse, but that's not true, you just haven't bothered to learn and optimise the shortcuts on a full-fledged DE like Gnome or KDE, but they can be just has efficient.

The only real advantage of vim is the near endless possibilities and configurations, allowing you to really custom tailor it to your workflow. I love this but then again I love configuring and tweaking things, if you don't like that then just go with you editor of choice, learn to touch-type and to use shortcuts as much as possible, and I can guarantee you'll be just as productive as you would have been if you had taken the time to learn and configure Vim.

Collapse
 
alexisfinn profile image
AlexisFinn • Edited

The best thing about vim is that you just never get bored with it, as other IDE's are cool at first and then slowly get boring or show their limitations, with vim it's the opposite, at first it seems cumbersome and highly underwhelming, but over time it just get's better and better.

Collapse
 
samuelabreu profile image
Samuel Abreu

I'm using neovim for almost 2 years now, and my advice is, don't try to replace one for another, chance is you get disappointed. Same for emacs.

Start using for small tasks (like quick edits or specific tasks like json files), and improve your config files as needed.

If you still have the urge to use more, research for plugins for specific needs, for development Coc is really good for beginners.

Collapse
 
siddharthshyniben profile image
Siddharth

I'm thinking of first writing the code in VSCode and then doing all other edits and debugging in vim

Collapse
 
juanvqz profile image
Juan Vasquez

What lenguaje do you use?

Collapse
 
siddharthshyniben profile image
Siddharth

Mainly Javascript, sometimes HTML/CSS

Collapse
 
juanvqz profile image
Juan Vasquez

I’d like to suggest my neovim config github.com/JuanVqz/dotfiles
I have using vim for several years writing web technologies. Keep posting buddy

Collapse
 
felixfong227 profile image
Felix Fong

For anyone who are trying to switch to full vim, but don't know how or where to start, you can use a tool call Vim Boostrap, it will help you generate a a pretty good started .vimrc file :D

vim-bootstrap.com/

Collapse
 
arnaudelub profile image
Arnaud Delubac

You are doing the right move, nvim + tmux is very powerful once configured correctly, i have been using it for the last 3 years now and there is just no limit on what you can do with it.

Collapse
 
gnsp profile image
Ganesh Prasad

The learning curve is steep. But it's worth the effort, vim makes editing code much efficient. You'll have to find the right plugins for your needs though.

I have been using vim since 2012, I have tried a number of other modern text editors over the years, but haven't found anything as efficient as vim.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.