4 ms·
I started using vim about 10 years ago. I am not an expert user, but I am using enough of it's features that I feel crippled when I am using another editor. I j
by ma2rten 8y ago
I started using vim about 10 years ago. I am not an expert user, but I am using enough of it's features that I feel crippled when I am using another editor. I just have to think move this function to another file and my fingers will execute the vim commands.
I don't know any Vim Script. You don't have to know it to use vim, unless you want to write your own plugins.
I tried using an IDE recently (Clion), but it was not really worth it. Vim has plugins for most IDE features, including autocomplete and syntax checking. The only feature that I really miss in Vim automatic refactoring such as inlining functions.
- nwatson 8y agoYou don't mention interactive debugging in vim ... and I'm not sure there's a good story there that's better than your CLion (Jetbrain's C/C++ IDE) -- I'd like to hear about vim interactive debugging. Perhaps there are other good debugging solutions for C/C++ but I like to edit and debug in the same environment. Any Python code I write or review in Python I try to give a run-through in PyCharm (JetBrain's Python IDE) interactively -- having a chance to step through code lets me consider more options and corner cases and get a more expansive view on what I'm developing or reviewing. "vim" is my preferred editor when I'm not in an IDE, and often when writing bash scripts, but over the last ten years especially I've rarely written higher-level language code outside an IDE environment ... and I stick to JetBrain's suite mostly these days.
- jtms 8y ago20 year vim user here... There is a really decent VIM plugin that works with all of the jetbrains IDEs I have used that I would recommend. It will even read your vimrc file! I wouldn’t write Java or C# without an IDE (IntelliJ IDEA and Rider respectively) and the vim plugin makes adjusting to them much less painful.
- ma2rten 8y agoDo you mean the plugin that is built in or is there different one?
- jtms 8y agoThis one https://plugins.jetbrains.com/plugin/164-ideavim https://plugins.jetbrains.com/plugin/164-ideavim
- sagartewari01 8y agoCan you provide the link for that plugin?
- jtms 8y agoI’m not in front of my workstation right now, but I believe this is the one: https://plugins.jetbrains.com/plugin/164-ideavim https://plugins.jetbrains.com/plugin/164-ideavim
- jtms 8y agoIt’s not perfect, but it does visual mode and visual block mode and will use as much of your vimrc as it can. Beats the heck out of vanilla IntelliJ that’s for sure.
- deleted 8y ago[deleted]
- ma2rten 8y agoVim 8.1 ships with a GDB plugin (TermDebug).
- krick 8y agoWell, TBH, that sounds naïve. I use vim for way more than 10 years, have 500 lines of vimrc with multiple plugins installed, know pretty much every shortcut by heart, never use arrows and can somewhat write VimL. It is really hard for me to code w/o vim-layout, so I was struggling for a long time, but finally moved onto using JetBrains products (with vim-mode plugin, which is meh, but better than nothing still). I don't really like it, but I have to finally admit, that vim with plugins is not "almost an IDE". Mileage would vary for different languages, but the point is that IDEA/PhpStorm/PyCharm can suggest me so much more than Vim, because it knows the AST, and writing plugins to operate it is currently easier than with vim. I mean, in theory you could install whatever backend you want onto vim, that does AST-parsing and autocompletion, there already exist pretty neat YouCompleteMe, jedi-vim (for python) and even heavy artillery such as eclim, but unfortunately it's all far from "solid support", and VimL is not the most friendly environment to write plugins for. I really wish there was an IDE that would be IDE-first (building an AST for each file, and using it for most of the functionality + making it easily usable in the scriptable plugins), but had the UI and usability of vim, but there doesn't seem to be any.
- ma2rten 8y agoI am currently writing C++ code. The vim plugins I am using are YouCompleteMe, Syntastic, UltiSnips and TermDebug. In combinations these plugins give me most functionality that an IDE has. Like I said, Clion (which is a JetBrains product) has some great functionality which goes beyond that. The one I found the most useful is the refactoring functionality. I actually opened Clion just to refactor some code on Friday. But it also has drawbacks. I am working a very large codebase and Clion is very slow.
- sagartewari01 8y agoWhat's the loc size of codebase? I've been using clion on blender (several million loc) and it runs pretty neat.
- ma2rten 8y agoI work at Google, so it's in the billions.
- stevebmark 8y agoThat's great. After moving that function, rename the file in Vim to reflect the change. Just kidding. Made you sweat though, huh? Not knowing how to use a more productive IDE doesn't mean that Vim is more productive.
- yakshaving_jgt 8y agoYou believing that renaming a file is difficult in Vim shows that you don’t know Vim as well as you think you do. Here, I’ll do it completely from memory for you, while typing on my iPhone. :saveas newfile.ext<cr><c-^>:!rm %<cr><cr>:bd<cr> And of course, you could always use the command line to rename anything.
- stevebmark 8y agoI wrote a plugin to do it, which is way better than what you posted. And they're both way worse than an IDE. And the command line is least efficient of all for this task.
- yakshaving_jgt 8y agoI’d like to remind you that you are arguing about the efficiency of renaming a file. This argument is so nonsensical it doesn’t bear contemplating.
- stevebmark 8y agoyup, you're right, talking about concrete examples of efficiency in a thread about efficiency is "so nonsensical," which you only pointed out after posting dozens of keystrokes for something that takes two keystrokes in well designed editors.
- yakshaving_jgt 8y agoExcluding the filename and extension which would have to type out in any case, there are actually only 22 keystrokes there. So, not dozens. You could also not bother destroying the old buffer. You could also do: :!mv % newfile.txt<cr><cr>:e newfile.txt Again excluding the filename and extension, that's a total of 12 keystrokes. And again, this is not a task anyone spends much of their working life performing. Give up.