vi/vim editor lazarus / 13-General ---------------------------------------------------------------------- cybersmyth · 2011-03-09 23:38 So in recent weeks I've had to do a fair amount of remote php work and had to finally learn vi/vim. I've tinkered with it in the past, but was never forced to really learn to use it properly. I'm still far from an expert, the thing is complicated as hell! But it is actually extraordinarily fast when you wrap your head around it and go with the flow the way it was designed. You pretty much have to unlearn modern IDE style editors, like Lazarus. I'm curious what others think of vi/vim. Getting back into Lazarus I've found myself pressing a lot of the vi/vim shortcuts out of muscle memory, I guess. I don't know if I'd abandon modern IDEs in favor of vi/vim but it is probably a really good tool to understand. Also... I'm getting sick of type "vi/vim" and hope to God I am never forced to use Emacs. ---------------------------------------------------------------------- eny · 2011-03-10 07:48 Vi has it's purpose and is great for editing scripts and even some simple programming (I once worked on a project for a year where all PL/SQL programming was done with vi). But AFAIK it doesn't have code completion, text selection (shift- numkeys), jumping back and forth between method definition and implementation, project mgmt, integrated compiling and debugging, oh and did I mention code completion :-) ---------------------------------------------------------------------- fabienwang · 2011-03-10 08:22 yes you did mention code completion twice eny ^^ I personally only use vi/vim on Linux when my GFX driver doesn't start anymore and that i have to change config files. It seems very powerful but i know only few shortcuts ---------------------------------------------------------------------- Leledumbo · 2011-03-10 08:39 Vim has pluggable architecture and it has ctags and omnicompletion support. Still, its usage is much more complicated than a real IDE. ---------------------------------------------------------------------- ik · 2011-03-10 10:10 I use vim as my main editor for almost 11 or 12 years now, because most of my work is actually located on remote servers (some are even located in different continents and countries). VIM is extremely powerful editor but it's not simple to work with, however when you learn how to work with it, many "normal" editors seems to lack a lot of editing features. I really like to see features of VIM (not vi) in SynEdit/Lazarus IDE. It can only increase productivity imho, and you will not require the mouse at all while writing code. ---------------------------------------------------------------------- mirce.vladimirov · 2011-03-10 14:11 I am using vi/vim, for (almost) 18 years. It's a powerful editor, but it is totatly non-intuitive, has totaly non-standard keyboard shortcuts. All in all, its totaly diferent then everything else, not recomended for new users, costs too much time and nerves to learn it unless there is somene to teach them. In console mode, there is no other editor like vi/vim, not even close to compare. In GUI mode, other editors are close to it (my modest opinion is, vi/vim is stil better) but, as i said, other editors are user-friendly and vim is not. Other editors have intuitive interface, lots of hints, and are easy to learn. Non-experienced command-prompt users: under linux console mode there is another editor, with more familiar interface, it's called 'mcedit', it's part of the MidnightCommander (known as 'mc'). When in console prompt just type "mcedit" and press ENTER. Or, "mcedit /path/to/filename.txt". Middle experienced and advanced command-prompt users would surely love the vi/vim editor. Because it's the best there is. ---------------------------------------------------------------------- saml · 2015-06-02 10:35 I've been using vim for the past few years, as I needed it when working as a systems administrator. I thought it would take way too much time to learn, but after I found the vimtutor command, this changed. If you carefully follow the tutorial in vimtutor for 30 minutes, and pick up at least the first 10-15 or so commands, you will be up and running with at least the same productivity as a normal text editor like notepad. (For going further, I highly highly recommend the book "Practical Vim" released by "The Pragmatic Bookshelf"). Auto-completion is also available for many languages, like python and Go, which I use. THe setup of the environment can be a bit tricky though, so I actually made docker-images for that purpose for python and golang: - https://github.com/samuell/devbox-python - https://github.com/samuell/devbox-golang vim seem to have grown in popularity lately among certain groups of programmers, and more and more other popular editors are incorporating "vim mode":s, that emulate some of vim:s basic functionality, for example the popular sublime text editor. It would be awesome to have an auto-completion engine working for freepascal, and also to have a "vim mode" in Lazarus! ---------------------------------------------------------------------- marcov · 2015-06-02 11:30 Quote from: cybersmyth on March 10, 2011, 12:38:50 amI'm curious what others think of vi/vim. Overrated torture tool.  The only thing worse is its predecessor "ed". I never got used to the base "mode" principle, even though I tried. (had to, e.g. in older commercial unixes). VIM is slightly better than those vi's though, but as said, the base principle and me don't match. It was one of the first editors to work with Regular expressions, but those are offered or can be added to most IDEs nowadays (and even then I only use them rarely in an IDE,  I generally do this on the cmdline using *nix tools/cygwin) QuoteAlso... I'm getting sick of type "vi/vim" and hope to God I am never forced to use Emacs. Emacs is a great OS. Pity that the editor sucks. Or at least that is the old joke about it. ---------------------------------------------------------------------- marcov · 2015-06-02 11:37 Quote from: fabienwang on March 10, 2011, 09:22:46 amyes you did mention code completion twice eny ^^ I personally only use vi/vim on Linux when my GFX driver doesn't start anymore and that i have to change config files. It seems very powerful but i know only few shortcuts I only use vim to fix the package system to install joe.  Has mostly the same shortcuts (wordstar) as Lazarus and Delphi, that makes it easier. I have used VI(m) for two decades on unix systems, but never could get used to it. The mode concept is IMHO counterproductive. Mostly you just want to be able to type without first checking what mode you used last. ---------------------------------------------------------------------- Paul Breneman · 2015-06-02 13:32 I've used Kedit since 1985 (tried a little with vi & vim) and my favorite site concerning text editors is this: http://www.softpanorama.org/Articles/orthodox_editors.shtml ---------------------------------------------------------------------- kamischi · 2015-06-02 18:30 I hate vi/vim. I am pissed off when it is set as default, because i cannot remember how to exit it and there is no hint. Therefore, i even need to google in order to quit, once in a blue moon. My choice is nano/pico, since they clearly give hints about the shortcuts and offer what i need, when it comes to the command line. As a GUI editor and Mac OS X, I use Alphax, Textwrangler, Lazarus and yes, Xcode. MiSchi ---------------------------------------------------------------------- Septe · 2015-06-03 03:10 Esc, then :q   I do remember this only because I banged my head trying to quit the stupid editor.  Why do you have to use the colon q, I don't know.  My opinion of Vim is that while it might be the best editor there is, the non-intuitive key strokes to do what you need to do is asinine.  Reminds me of Wordstar and that Ctrl x, q keystrokes.  Yes, I am that old. ---------------------------------------------------------------------- benohb · 2015-06-03 06:58 Quote I do remember this only because I banged my head trying to quit the stupid editor +1 I consider  a racist Editor .. (Ex azerty Keyboard). QuoteI personally only use vi/vim on Linux when my GFX driver doesn't startnano is best QuoteI only use vim to fix the package system to install If you installed freepascal .. Code: [Select]fp text.txt fp IDE is magical