geekhack

geekhack Community => Other Geeky Stuff => Topic started by: Quarzac on Thu, 29 September 2011, 19:26:05

Title: What is VIM?
Post by: Quarzac on Thu, 29 September 2011, 19:26:05
I googled it and found that it's some sort of suped up text editor. But what in the world is it used for? I figured this was as good a place as any to ask, considering I've seen the keycap floating around.
Title: What is VIM?
Post by: theferenc on Thu, 29 September 2011, 19:30:09
It's a standard UNIX text editor. Support for extensions, syntax highlighting, intelligent indentation, etc. Basically, it's one of the two possible editors used by UNIX/linux developers, the other being emacs.

Oh, and it's modal, while emacs is chorded. That's really the main difference between them.
Title: What is VIM?
Post by: Quarzac on Thu, 29 September 2011, 19:39:07
Quote from: theferenc;423750
It's a standard UNIX text editor. Support for extensions, syntax highlighting, intelligent indentation, etc. Basically, it's one of the two possible editors used by UNIX/linux developers, the other being emacs.

Oh, and it's modal, while emacs is chorded. That's really the main difference between them.
Uhh... I am a huge linux noob. I have no idea what modal or chorded means, unless it's similar to unimodal/bimodal, like in statistics, or chords like in music. On a side note, as previously mentioned, I know nothing of linux/unix. What language do linux developers use? Assembly? Basic? I can't imagine it's too complicated at a kernel level.
Title: What is VIM?
Post by: alaricljs on Thu, 29 September 2011, 20:09:27
Developers of the linux kernel and many of the basic OS utilities use C, although some optimizations might be in assembly (I haven't checked).  Many more advanced utilities use C++.  Some applications add Java to the mix.  Lots of administrative tools are written in scripting languages so that admins can modify them:  bash, perl, tcl, even java.   Throw in web stuff and you get PHP, ruby, javascript.  Throw python onto any of the previous lists too...  Mono is a port of C# and .NET to Linux so you got that too although I never heard of someone actually using it.  Emacs uses lisp as its scripting language.  

If you're supporting legacy code you also have fortran, cobol, and probably some I never knew the name of or have completely forgotten... ada is in there too I think.

Linux also attracts a lot of boutique languages, none of which I remember off hand...

And that's a short list from a systems admin, I don't generally dabble in anything but interpreted scripts.
Title: What is VIM?
Post by: Daniel Beaver on Thu, 29 September 2011, 20:29:54
Quote
Uhh... I am a huge linux noob. I have no idea what modal or chorded means, unless it's similar to unimodal/bimodal, like in statistics, or chords like in music.

Chords like in music. Most programs we use have hotkeys, where you chord together keys together to perform a command (i.e., ctrl+alt+del, or ctrl+s). That is the convention Emacs follows.

Vim, on the other hand, is modal; it does not have hotkeys per-se. Rather, it has several different modes: command mode, insert mode, and visual mode being the most used. Vim is normally in command mode, where every key on the keyboard performs some operation. When you want to enter text, you enter insert mode (usually by pressing 'i'), at which point every key becomes a standard text-input key. Pressing escape pulls you back into command mode. It is sort of strange to explain, since this type of command scheme is so uncommon.

Quote
But what in the world is it used for?
Powerful, efficient text input and modification within a terminal. Vi (the more primitive predecessor to Vim) is installed by default on nearly *nix system, so it is a handy tool to know. And once you reach a certain level of expertise using it, you become the Kwisatz Haderach of text manipulation.

The non-bearded would be best served by simply ignoring its existence.
Title: What is VIM?
Post by: Quarzac on Thu, 29 September 2011, 20:42:07
Quote from: Daniel Beaver;423772
Chords like in music. Most programs we use have hotkeys, where you chord together keys together to perform a command (i.e., ctrl+alt+del, or ctrl+s). That is the convention Emacs follows.

Vim, on the other hand, is modal; it does not have hotkeys per-se. Rather, it has several different modes: command mode, insert mode, and visual mode being the most used. Vim is normally in command mode, where every key on the keyboard performs some operation. When you want to enter text, you enter insert mode (usually by pressing 'i'), at which point every key becomes a standard text-input key. Pressing escape pulls you back into command mode. It is sort of strange to explain, since this type of command scheme is so uncommon.


Powerful, efficient text input and modification within a terminal. Vi (the more primitive predecessor to Vim) is installed by default on nearly *nix system, so it is a handy tool to know. And once you reach a certain level of expertise using it, you become the Kwisatz Haderach of text manipulation.

The non-bearded would be best served by simply ignoring its existence.

You just referenced Dune. I like you more now. Considering I had nothing to dislike you for, you now have 1 million points. Congratulations. I don't think I'll be getting to involved with Linux development, so I don't think I'm going to worry about it right now. I think I'm just going to keep on using Ubuntu because I like it and to keep up with all the coding I'm going to be doing in the coming months.
Title: What is VIM?
Post by: alaricljs on Thu, 29 September 2011, 22:08:01
A guy I knew back in the day started the nano project.  Yet another editor for linux users and one that's a whole lot simpler than vim or emacs.  Just in case you need to edit straight text at some point rather than a "document"  :)
Title: What is VIM?
Post by: D-EJ915 on Thu, 29 September 2011, 23:04:32
If you just need to add something really quickly nano is a lot faster than emacs and vim, just jump to where you want add the text and ctrl-o ctrl-x and you are done.
Title: What is VIM?
Post by: theferenc on Thu, 29 September 2011, 23:15:50
If you're coding, you really do need to learn either vi(m) or emacs. Both have decently steep learning curves, but you seriously become ninja like in your ability to manipulate text once you're proficient. I can get around in both, but I definitely prefer emacs, but that's mainly because I learned it first, and have it extensively customized. I should probably try and switch full time to vim, to get it to an equal footing. But I doubt I will.

Take a look here for vim: http://www.openvim.com/tutorial.html

For emacs, there is this: http://www2.lib.uchicago.edu/keith/tcl-course/emacs-tutorial.html

Just remember kids: emacs is a better operating system, but UNIX has a better editor.
Title: What is VIM?
Post by: Quarzac on Fri, 30 September 2011, 08:29:14
Quote from: theferenc;423843
If you're coding, you really do need to learn either vi(m) or emacs. Both have decently steep learning curves, but you seriously become ninja like in your ability to manipulate text once you're proficient. I can get around in both, but I definitely prefer emacs, but that's mainly because I learned it first, and have it extensively customized. I should probably try and switch full time to vim, to get it to an equal footing. But I doubt I will.

Take a look here for vim: http://www.openvim.com/tutorial.html

For emacs, there is this: http://www2.lib.uchicago.edu/keith/tcl-course/emacs-tutorial.html

Just remember kids: emacs is a better operating system, but UNIX has a better editor.

I will take your word for it. I don't quite understand why now, but I figure once I learn how to use the program, it'll probably make more sense to me. Right now I use Eclipse for Java development and MonoDevelop for C# development. Though I have to learn javascript and HTML5. Is VIM a good way to do so? From what I understand it's not an IDE, it's more of an intense way to edit your code. So I'd have to compile it using outside resources, correct?
Title: What is VIM?
Post by: alaricljs on Fri, 30 September 2011, 08:58:59
Yes you'd need to use other tools than VIM to compile and debug.  However, there are ways to integrate these actions with VIM.  VIM then becomes the console for those commands and you can kick of a new build with :make and jump through errors in your code afterwards.

VIMs strongpoints:  Regular expressions and scriptable actions.

Using regex is text kung fu.  You need to replace 'blah' with 'crap', no problem.  Need to do it only when 'blah' is a separate word? (ex: don't change 'reblah'), no problem.  You can also pull apart a line of text, reuse some of it and replace some of it.  There's tons of ways to use regular expressions.

Scriptable actions means that anything you do regularly can be made into a command.  In fact if you have a standard format for your header files or any other file you can have VIM start with a default template if you edit a new file of that type.  If you're stuck doing repetitive things, it's handy.

Then you have a huge pile of features that may or may not apply... Auto indent can be handy for coders, brace matching, syntax highlighting, external command execution redirected into a buffer...

and on and on and on   :)
Title: What is VIM?
Post by: Quarzac on Fri, 30 September 2011, 09:03:16
Ok, so in looking into it, I did a search on Ubuntu's software manager, and GVIM came up. is that what I'm looking for, or should I go through the whole compiling process from http://www.vim.org?
Title: What is VIM?
Post by: alaricljs on Fri, 30 September 2011, 09:06:55
gvim in ubuntu will be the 'graphical vim'  which is Vim with a minor X wrapper... it will probably include the console version too, but I don't use ubuntu so I dunno.
Title: What is VIM?
Post by: insilica on Fri, 30 September 2011, 09:22:12
Quote from: Daniel Beaver;423772
Chords like in music. Most programs we use have hotkeys, where you chord together keys together to perform a command (i.e., ctrl+alt+del, or ctrl+s). That is the convention Emacs follows.

Vim, on the other hand, is modal; it does not have hotkeys per-se. Rather, it has several different modes: command mode, insert mode, and visual mode being the most used. Vim is normally in command mode, where every key on the keyboard performs some operation. When you want to enter text, you enter insert mode (usually by pressing 'i'), at which point every key becomes a standard text-input key. Pressing escape pulls you back into command mode. It is sort of strange to explain, since this type of command scheme is so uncommon.


Powerful, efficient text input and modification within a terminal. Vi (the more primitive predecessor to Vim) is installed by default on nearly *nix system, so it is a handy tool to know. And once you reach a certain level of expertise using it, you become the Kwisatz Haderach of text manipulation.

The non-bearded would be best served by simply ignoring its existence.


pretty complete description.

The main motivation for using vim for me: I code in java, c++, ruby python - instead of learning separate IDE(Integrated Development Environments) for each you learn one, same can be said about eclipse. also it is often very useful for me because I'm constantly installing distros, configuring distros (i.e. gentoo) and VI is always available - also nano is super primitive in comparison to vim

I especially like the fact that I don't need to use the bloody mouse or the arrow keys, its key combos or single keys to navigate your entire file, whether its jump to start/end file start/end of word same letter, beginning/end of document /-> its all chord'ed - and it's even better when you multiplex vim in tmux or get the multiplexing plugins for vim

If you would like to try vim you can grab a binary for windows.
Title: What is VIM?
Post by: Quarzac on Fri, 30 September 2011, 09:59:22
I went through the interactive tutorial theferenc posted, and the navigation seemed far from intuitive to me. I'll probably take a look at it to see if it as useful as you all claim, as it sounds like it could be. Though it seems like if I'm going to be coding in one or two languages, I may just be better off using an IDE for simplicity's sake. I can use MonoDevelop for Java, C#, and Python, should I need it, so I might stick with that for the time being purely because VIM looks quite complicated. However, is VIM the preferred method of coding in JavaScript and HTML5? Because I need a way to do that, preferably with error checking, because my code will definitely be sloppy as I pick up the syntaxes.
Title: What is VIM?
Post by: Ekaros on Fri, 30 September 2011, 11:23:23
How easy it is with run-time debugging? Worth to change from ide, if g++ is used?
Title: What is VIM?
Post by: Chobopants on Fri, 30 September 2011, 11:26:39
Quote from: alaricljs;423815
A guy I knew back in the day started the nano project.  Yet another editor for linux users and one that's a whole lot simpler than vim or emacs.  Just in case you need to edit straight text at some point rather than a "document"  :)

If you know vim/emacs really well it's MUCH faster than nano.
Title: What is VIM?
Post by: Quarzac on Fri, 30 September 2011, 11:28:36
Quote from: Ekaros;424048
How easy it is with run-time debugging? Worth to change from ide, if g++ is used?
I have no idea what you're saying or who this is directed at.
Title: What is VIM?
Post by: alaricljs on Fri, 30 September 2011, 11:31:09
The point being that unless the user is interested in learning a real editor for serious work... nano will at least get the job done.  There are enough new users to Linux that are just interested in getting it up and running to use as a desktop and have office and similar tools that may run into the need to edit a simple text file now and again.
Title: What is VIM?
Post by: insilica on Fri, 30 September 2011, 11:33:50
Quote from: Ekaros;424048
How easy it is with run-time debugging? Worth to change from ide, if g++ is used?


OK I suppose!

You can execute shell commands directly

http://lmgtfy.com/?q=vim+debugging

also see VIM plugins like:

http://www.vim.org/scripts/script.php?script_id=1386
Title: What is VIM?
Post by: Daniel Beaver on Fri, 30 September 2011, 20:50:30
Quote from: theferenc;423843

Take a look here for vim: http://www.openvim.com/tutorial.html


Oooh... that's super slick.
Title: What is VIM?
Post by: theferenc on Fri, 30 September 2011, 23:58:08
I thought it was pretty cool, myself.

So, I heard a story about the origins of the arrow key movement in vim the other day. Apparently, Bill Joy was using an ADM3A terminal keyboard, which embedded the arrows on HJKL, so that's what he used for navigation, and hence, what we use for navigation today.

Not sure how true it is, but I got it from someone who actually knows Bill Joy, so it's likely somewhat true.
Title: What is VIM?
Post by: Brodie337 on Sat, 01 October 2011, 00:00:39
Vim is included out of the box on Ubuntu. It takes alot of getting used to, but I love it.
Title: What is VIM?
Post by: hashbaz on Sat, 01 October 2011, 01:56:19
Quote from: Quarzac;424012
I went through the interactive tutorial theferenc posted, and the navigation seemed far from intuitive to me. I'll probably take a look at it to see if it as useful as you all claim, as it sounds like it could be. Though it seems like if I'm going to be coding in one or two languages, I may just be better off using an IDE for simplicity's sake. I can use MonoDevelop for Java, C#, and Python, should I need it, so I might stick with that for the time being purely because VIM looks quite complicated. However, is VIM the preferred method of coding in JavaScript and HTML5? Because I need a way to do that, preferably with error checking, because my code will definitely be sloppy as I pick up the syntaxes.

I was in your shoes four years ago.  I went through the vim tutorial because I knew all the hardcore programmers at my school used it.  Found it bizarre but usable at first.  After a couple of weeks I started to enjoy it.  Now editing text in anything else is frustrating.  It's strange, but I really do enjoy editing text in vim in a deep, almost visceral way.  Its much-hated modal interface allows it to have very terse, focused commands, and once you get to know them well writing code starts to feel like shaping wood or molding clay.  The distance from thought to text is so small that your hands feel like they are crafting the text directly.  Sorry I am nerding out about this.

vim does have chords/hotkeys, but they all use one modifier only.  And most of its core feature set (e.g., searching, copy/paste, moving the cursor) are done in what is called "normal mode" and require no modifiers at all.  This is very different from the emacs philosophy, which is a single "mode" with a huge number of ctrl+alt/meta+letter commands -- in fact one old joke is that emacs stands for Escape Meta Alt Control Shift.  Jokes aside, though, definitely also give emacs a serious try.  It's a fantastic editor.  It's just not for me.
Title: What is VIM?
Post by: Daniel Beaver on Sat, 01 October 2011, 08:19:02
Quote from: theferenc;424447
So, I heard a story about the origins of the arrow key movement in vim the other day. Apparently, Bill Joy was using an ADM3A terminal keyboard, which embedded the arrows on HJKL, so that's what he used for navigation, and hence, what we use for navigation today.

Not sure how true it is, but I got it from someone who actually knows Bill Joy, so it's likely somewhat true.

Bill Joy wrote the first version of vi on an ADM3A. Besides the arrow keys, you can also see why he used Esc:

(http://upload.wikimedia.org/wikipedia/commons/a/a0/KB_Terminal_ADM3A.svg)

The hjkl arrow keys are one of my least favorite quirks of vim. Inverted T arrow keys are so much more intuitive.
Title: What is VIM?
Post by: Quarzac on Sat, 01 October 2011, 08:57:37
Quote from: Daniel Beaver;424541
Bill Joy wrote the first version of vi on an ADM3A. Besides the arrow keys, you can also see why he used Esc:

Show Image
(http://upload.wikimedia.org/wikipedia/commons/a/a0/KB_Terminal_ADM3A.svg)


The hjkl arrow keys are one of my least favorite quirks of vim. Inverted T arrow keys are so much more intuitive.
This I agree with. If there was some way to change this to that, I'd be all over it.
Title: What is VIM?
Post by: Chobopants on Sat, 01 October 2011, 09:13:40
There is, you can change anything in vim. I've grown to like hjkl though.
Title: What is VIM?
Post by: sordna on Sat, 01 October 2011, 11:15:11
Quote
Inverted T arrow keys are so much more intuitive.

Quote from: Quarzac;424554
This I agree with. If there was some way to change this to that, I'd be all over it.

What are you guys talking about, vim supports arrow keys out of the box, there's no need to configure anything. I use arrow keys in both command and insert mode, it works just fine.
Even pgup/pgdown and home/end keys work.
I use HJKL too, but when I'm Dvorak I prefer arrow the arrow keys.
Title: What is VIM?
Post by: ch_123 on Sun, 02 October 2011, 10:22:51
Quote from: theferenc;424447
I thought it was pretty cool, myself.

So, I heard a story about the origins of the arrow key movement in vim the other day. Apparently, Bill Joy was using an ADM3A terminal keyboard, which embedded the arrows on HJKL, so that's what he used for navigation, and hence, what we use for navigation today.

Not sure how true it is, but I got it from someone who actually knows Bill Joy, so it's likely somewhat true.

 
Correct.

On the same terminal, ~ and HOME were on the same key, thus explaining the convention in Unix of using ~ to represent the user's home folder.
Title: What is VIM?
Post by: theferenc on Sun, 02 October 2011, 15:43:57
Yes, that was brought up in the same discussion as well.

Funny how these silly design decisions were made, isn't it?
Title: What is VIM?
Post by: dorkvader on Sun, 02 October 2011, 23:36:18
Quote from: Daniel Beaver;424541
Bill Joy wrote the first version of vi on an ADM3A. Besides the arrow keys, you can also see why he used Esc:

The hjkl arrow keys are one of my least favorite quirks of vim. Inverted T arrow keys are so much more intuitive.
That's the only reason I'm not using it right now. HJKL + Dvorak = fail.

I use Gedit (syntax highlighting is awesome) or nano for everything, really.

Edit: though it seems that I can ignore those keys and just use the arrows? I may have to switch immediately.

(Also, I know you can change the keys to HTNS, but I don't really have time to invent a new layout layer for vim. I feel like anything good shouldn't be based on QWERTY at all, this is why I haven't tried Colemak.)
Title: What is VIM?
Post by: hashbaz on Sun, 02 October 2011, 23:43:37
Quote from: dorkvader;425314
That's the only reason I'm not using it right now. HJKL + Dvorak = fail.

I use Gedit (syntax highlighting is awesome) or nano for everything, really.

Edit: though it seems that I can ignore those keys and just use the arrows? I may have to switch immediately.

(Also, I know you can change the keys to HTNS, but I don't really have time to invent a new layout layer for vim. I feel like anything good shouldn't be based on QWERTY at all, this is why I haven't tried Colemak.)

Dude, just remap the keys.  Gedit, really?  Not that I'm judging.  (Some of the best programmers where I work use nedit.)  But still.  Surely someone has already come up with a vim layout for Dvorak.   And I don't think it's fair to say that vim's movement keys are based on QWERTY.  They are based on home row.
Title: What is VIM?
Post by: mich on Mon, 03 October 2011, 03:52:29
Quote from: dorkvader;425314
That's the only reason I'm not using it right now. HJKL + Dvorak = fail.

I use Gedit (syntax highlighting is awesome) or nano for everything, really.

Edit: though it seems that I can ignore those keys and just use the arrows? I may have to switch immediately.
I use dvorak and vim for few years and have really no problem with HJKL. H is right index finger's home key, L is just above right home row and J and K are placed next to each other just below left home row. It isn't much more inconvenient than in QWERTY where you have to move entire right hand one key to the left, and it still requires much less movement than reaching arrows.
Title: What is VIM?
Post by: pyro on Mon, 03 October 2011, 05:08:24
And don't forget B,W, and E, they navigate faster and you don't have to use your pinkies. Just as Tx or Fx.
Title: What is VIM?
Post by: Daniel Beaver on Mon, 03 October 2011, 12:28:00
Quote from: pyro;425402
And don't forget B,W, and E, they navigate faster and you don't have to use your pinkies. Just as Tx or Fx.

Too many of the navigational keys are in awkward places (B being the most annoying). Honestly, I think the entire layout is not very well thought out. I know you can easily change things, but that destroys one of vi's primary advantages: that you can use it on every system (so much for muscle memory)
Title: What is VIM?
Post by: pyro on Mon, 03 October 2011, 16:26:58
It works with mnemonics rather than layout. There's no other sensible way to deal with the flexibility.
Title: What is VIM?
Post by: dorkvader on Mon, 03 October 2011, 22:59:55
Quote from: hashbaz;425320
Dude, just remap the keys.  Gedit, really?  Not that I'm judging.  (Some of the best programmers where I work use nedit.)  But still.  Surely someone has already come up with a vim layout for Dvorak.   And I don't think it's fair to say that vim's movement keys are based on QWERTY.  They are based on home row.
Gedit came pre-installed, and is easy to use. I was impressed with syntax highlighting. I also use Links, if that helps to redeem myself. Mostly I use Gedit now to compose Octave code for class and Homework.

I think I'll have to start using VI. I've always wanted to (ever since I read up on it one day), and considering that Dvorak compatibility is pretty good, actually.

I'm telling you, I really didn't want to remap the keys. I felt like I had to, so I never switched. You're right about home row, though.
Title: What is VIM?
Post by: Chobopants on Tue, 04 October 2011, 08:15:18
Also, capitalizing vi/vim looks REALLY funny. It's lower case. :)
Title: What is VIM?
Post by: alaricljs on Tue, 04 October 2011, 08:25:09
All caps is certainly wrong... but even Bram's vim.org and the official logo have it as Vim.

On the other hand I too prefer all lower - vim    :)
Title: What is VIM?
Post by: j-dev on Tue, 04 October 2011, 09:08:21
Thought I would open up with my favorite xkcd of all time, unfortunately I can't post links yet. But Google 'Real Programmers' - the first listing should be the link to it.

I am an ex-nano'er, who now, like many who posted, find it infuriating to deal with any editor other than vim. I made the switch after working with some embedded hardware that ran linux - to my dismay at the time, there was no nano! The only editor available was vi. I realized that in order to become successful on the *nix platform, you must know vi. I'm not saying you have to love it and use it as your go to editor, but you should at least know how to find your way around a file. After using it for awhile, vim always seems to.... 'grow' on you :)

Now, I can't imagine using anything else!

For the other vim'ers: If you haven't tried it already, I highly recommend using screen and vim together (or tmux and vim) - the split screen capabilities are beastly.
Title: What is VIM?
Post by: hashbaz on Tue, 04 October 2011, 11:46:51
Quote from: j-dev;425930
Thought I would open up with my favorite xkcd of all time, unfortunately I can't post links yet. But Google 'Real Programmers' - the first listing should be the link to it.


I had this printed out hanging in my cube for a long time:

(http://geekhack.org/attachment.php?attachmentid=27898&d=1317746723)
Title: What is VIM?
Post by: Daniel Beaver on Tue, 04 October 2011, 11:46:53
Quote from: j-dev;425930
Thought I would open up with my favorite xkcd of all time, unfortunately I can't post links yet. But Google 'Real Programmers' - the first listing should be the link to it.

You're welcome. (http://xkcd.com/378/)
Title: What is VIM?
Post by: hashbaz on Tue, 04 October 2011, 11:49:03
Quote from: j-dev;425930
For the other vim'ers: If you haven't tried it already, I highly recommend using screen and vim together (or tmux and vim) - the split screen capabilities are beastly.

I hear this a lot, but I'm a gvim man (sans UI of course).  Something in my config makes terminal vim unresponsive in ways that don't affect gvim.  Maybe it's time to figure out why.
Title: What is VIM?
Post by: sam113101 on Tue, 04 October 2011, 20:07:36
Nice colorscheme for vim:
http://ethanschoonover.com/solarized
Title: What is VIM?
Post by: alaricljs on Tue, 04 October 2011, 20:18:05
Quote from: sam113101;426159
Nice colorscheme for vim:
http://ethanschoonover.com/solarized

My latest hero... that is an awesome color scheme.
Title: What is VIM?
Post by: Xuan on Wed, 05 October 2011, 00:08:14
Quote from: hashbaz;425967
I hear this a lot, but I'm a gvim man (sans UI of course).  Something in my config makes terminal vim unresponsive in ways that don't affect gvim.  Maybe it's time to figure out why.

 
You're probably pressing Ctrl+S. Which puts the terminal on pause, try pressing Ctrl+Q to make it work again.

Quarzac: If you use eclipse, try the vrapper plugin. I read it here somewhere and I tried it.
It's wonderful, all the magic from vim into with the powerful eclipse. I can't live without it.
Title: What is VIM?
Post by: hashbaz on Wed, 05 October 2011, 00:08:41
Quote from: sam113101;426159
Nice colorscheme for vim:
http://ethanschoonover.com/solarized

Looks nice, I'll give it a try.  My favorites are dante and candycode.
Title: What is VIM?
Post by: hashbaz on Wed, 05 October 2011, 00:13:47
Quote from: Xuan;426220
You're probably pressing Ctrl+S. Which puts the terminal on pause, try pressing Ctrl+Q to make it work again.

Quarzac: If you use eclipse, try the vrapper plugin. I read it here somewhere and I tried it.
It's wonderful, all the magic from vim into with the powerful eclipse. I can't live without it.

Naw, it's not that.  When I hit escape to leave insert mode, if I type too quickly afterward I get a seemingly random character inserted and remain in insert mode.  It feels like vim is waiting on a short timeout for me to type an escape sequence.  Very, very annoying.
Title: What is VIM?
Post by: xwhatsit on Wed, 05 October 2011, 06:08:35
Quote from: hashbaz;426223
Naw, it's not that.  When I hit escape to leave insert mode, if I type too quickly afterward I get a seemingly random character inserted and remain in insert mode.  It feels like vim is waiting on a short timeout for me to type an escape sequence.  Very, very annoying.

Ah yup. I think that's timeoutlen. Try `set timeoutlen=100' in your vimrc and give it a whirl. It's default 1000. For details as usual check :help.
Title: What is VIM?
Post by: hashbaz on Wed, 05 October 2011, 15:10:15
Quote from: xwhatsit;426289
Ah yup. I think that's timeoutlen. Try `set timeoutlen=100' in your vimrc and give it a whirl. It's default 1000. For details as usual check :help.

Interesting.  Setting timeoutlen to 1 does bandaid the issue, but there's something else going on here.  For one, my timeoutlen is set to 50 somehow (not in my rc files) in both vim and gvim -- but only terminal vim exhibits the problem.  The real question is why escape is considered as the start of a mapped key sequence.  That makes no sense.

edit: I should have known.  I use a plugin called vimacs to get emacs-like editing hotkeys in insert mode and while editing commands (mainly ctrl-{AKFBD}).  That plugin sets timeoutlen and also seems to be causing the weird escape behavior.  That'll teach me to mix water and oil.
Title: What is VIM?
Post by: Xuan on Fri, 07 October 2011, 13:26:34
Quote from: hashbaz;426480

edit: I should have known.  I use a plugin called vimacs to get emacs-like editing hotkeys in insert mode and while editing commands (mainly ctrl-{AKFBD}).  That plugin sets timeoutlen and also seems to be causing the weird escape behavior.  That'll teach me to mix water and oil.


Ohu! I think that's because some terminal emulators send Alt+Something as a Esc,Something sequence, so to recognize Alt commands it has to wait a bit after each time Esc is pressed. It sucks!

Quote from: hashbaz;426221
Looks nice, I'll give it a try.  My favorites are dante and candycode.


I love zenburn (http://slinky.imukuppi.org/zenburn/)
Title: What is VIM?
Post by: Daniel Beaver on Fri, 07 October 2011, 21:18:01
Quote from: Xuan;427050
I love zenburn (http://slinky.imukuppi.org/zenburn/)

I am also a zenburn fan. So much so that I use it in every application that I can customize color palettes for.
Title: What is VIM?
Post by: insilica on Sat, 08 October 2011, 06:53:46
Just curious - I've been using VIM for most things for the past couple of years but I've recently started using sublime text for coding - well it's free (indefinite evaluation at the moment) - it's kinda of cool and I'm really taking to it - just sharing my experience
Title: What is VIM?
Post by: Daniel Beaver on Sat, 08 October 2011, 09:22:02
Sublime Text is pretty good, though you can replicate almost all it's features in Notepad++.
Title: What is VIM?
Post by: insilica on Sat, 08 October 2011, 09:37:52
Quote from: Daniel Beaver;427484
Sublime Text is pretty good, though you can replicate almost all it's features in Notepad++.

Except notepad++ is only really available on M$ platform. Sublime runs on M$, Mac and Linux (at least the beta does) - actually I'm liking it because there a geeza working on VIM functionality - trouble is I use urxvtd (lots of command work) and on gentoo for some reason copy/paste is a nightmare ... especially when multiplexing in Tmux
Title: What is VIM?
Post by: daerid on Sun, 09 October 2011, 18:58:09
ir_black (https://raw.github.com/gist/1085327/2e151d8145851d64d39c5653e4b104c13ab81ffb/ir_black.vim) here.

Oh, and I can't use any text editor if it's not vim. It's just too weird. I have to use ViEmu if I ever find myself in Visual Studio (yuck).
Title: What is VIM?
Post by: nar on Tue, 11 October 2011, 16:12:19
Quote from: Daniel Beaver;427323
I am also a zenburn fan. So much so that I use it in every application that I can customize color palettes for.

Same here, on my Linux VM I have the desktop colour scheme for KDE and Gnome (The Elegant Mine theme fits perfectly with zenburn colours) completely zenburned.
Title: What is VIM?
Post by: Xuan on Thu, 13 October 2011, 11:11:37
Quote from: insilica;427495
Except notepad++ is only really available on M$ platform. Sublime runs on M$, Mac and Linux (at least the beta does) - actually I'm liking it because there a geeza working on VIM functionality - trouble is I use urxvtd (lots of command work) and on gentoo for some reason copy/paste is a nightmare ... especially when multiplexing in Tmux


Have you tried using xclip? It uses the X bin, so better interoperability with other programs.

I have this in mi vimrc
Code: [Select]

" Copy with C-w
vmap <C-w> y:call system(&quot;xclip -i -selection clipboard&quot;, getreg(&quot;\&quot;&quot;))<CR>:call system(&quot;xclip -i&quot;, getreg(&quot;\&quot;&quot;))<CR>

&quot; paste with  C-y
nmap <C-y> :call setreg(&quot;\&quot;&quot;,system(&quot;xclip -o -selection clipboard&quot;))<CR>p

&quot; to paste in insert mode
imap <C-y> <Esc><C-y>a
Title: What is VIM?
Post by: insilica on Thu, 13 October 2011, 12:19:07
Quote from: Xuan;430175
Have you tried using xclip? It used the X bin, so better interoperability with other programs.

I have this in mi vimrc
Code: [Select]

&quot; Copy with C-w
vmap <C-w> y:call system(&quot;xclip -i -selection clipboard&quot;, getreg(&quot;\&quot;&quot;))<CR>:call system(&quot;xclip -i&quot;, getreg(&quot;\&quot;&quot;))<CR>

&quot; paste with  C-y
nmap <C-y> :call setreg(&quot;\&quot;&quot;,system(&quot;xclip -o -selection clipboard&quot;))<CR>p

&quot; to paste in insert mode
imap <C-y> <Esc><C-y>a


oooo nice - ty sir :

Code: [Select]
rm sublime
Title: What is VIM?
Post by: daerid on Sat, 15 October 2011, 03:41:21
I always get interested looking at other text editors... then I realize that Vim is free and open source, and more powerful than any editor I've tried. It ain't going anywhere. I build my own version of vim on all windows, mac, and linux (whenever I work in it). Don't mess with a good thing.
Title: What is VIM?
Post by: flyball on Sat, 15 October 2011, 05:22:23
Quote from: daerid;431580
I always get interested looking at other text editors... then I realize that Vim is free and open source, and more powerful than any editor I've tried. It ain't going anywhere. I build my own version of vim on all windows, mac, and linux (whenever I work in it). Don't mess with a good thing.

sounds like you havent tried emacs
Title: What is VIM?
Post by: fossala on Sat, 15 October 2011, 05:30:11
Emacs user here. I used to use vim but just found emacs more comfortable.
Title: What is VIM?
Post by: daerid on Tue, 18 October 2011, 02:15:30
Quote from: flyball;431596
sounds like you havent tried emacs

Yeah, I tried emacs. Didn't like it. Although I do acknowledge it's power, as well as it's importance in the development community. I just find that the modal editing of Vim works better for how I think.


PS: Just gave emacs another shot. WTH? It's a 140MB install? For a text editor? And I thought Vim's 20mb was excessive.
Title: What is VIM?
Post by: flyball on Tue, 18 October 2011, 09:51:57
Quote from: daerid;433415
PS: Just gave emacs another shot. WTH? It's a 140MB install? For a text editor? And I thought Vim's 20mb was excessive.
if you install it from a package it probably comes with full elisp sources, extra addons, possibly multiple graphics frontends, ect. if you are really hurting for space then you can compile it yourself
Title: What is VIM?
Post by: RC-1140 on Tue, 18 October 2011, 20:39:22
I just remembered this:”Emacs is a great operating system – it lacks a good editor, though.“ when reading these posts. But I have to admit, I never really tried emacs, I just like my vim too much. I like the modal setup and don't like using too many modifiers.
Title: What is VIM?
Post by: daerid on Thu, 20 October 2011, 03:16:34
Quote from: flyball;433547
if you install it from a package it probably comes with full elisp sources, extra addons, possibly multiple graphics frontends, ect. if you are really hurting for space then you can compile it yourself

I installed it on Windows, so no idea if it came with the Lisp sources.

PS: As a programmer myself I also find Lisp abhorrent. I find that vimscript is much more palatable, when necessary, otherwise I extend vim with Python
Title: What is VIM?
Post by: JBert on Thu, 20 October 2011, 03:24:57
Quote from: j-dev;425930
...
For the other vim'ers: If you haven't tried it already, I highly recommend using screen and vim together (or tmux and vim) - the split screen capabilities are beastly.
I could see how this would help if your are continuously switching between the console and Vim.
If you want to edit multiple files it is nicer to use Vim's split windows, buffers and tabs to alternate between them.