Author Topic: What is VIM?  (Read 12441 times)

0 Members and 1 Guest are viewing this topic.

Offline Quarzac

  • A very busy dude!
  • Thread Starter
  • Posts: 676
  • Location: Bay Area
  • Still around, sometimes.
What is VIM?
« 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.
Risen from the dead for a model F.

Wyse buy colors were GSY for the dark grey, GBA for the light grey, and BBI for the fonts.

Offline theferenc

  • Posts: 1327
What is VIM?
« Reply #1 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.
HHKB Pro 2 -- Custom UNIX layout Unicomp Customizer 101 -- IBM Model M 1391401 (modded to UNIX layout) -- IBM 1397000 (also UNIX layout) -- SSK in UNIX layout -- Model F 122 key in UNIX layout (Soarer USB "native")
 
CST L-TracX trackball -- Kensington Expert Mouse trackball

Offline Quarzac

  • A very busy dude!
  • Thread Starter
  • Posts: 676
  • Location: Bay Area
  • Still around, sometimes.
What is VIM?
« Reply #2 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.
Risen from the dead for a model F.

Wyse buy colors were GSY for the dark grey, GBA for the light grey, and BBI for the fonts.

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
What is VIM?
« Reply #3 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.
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline Daniel Beaver

  • Posts: 504
What is VIM?
« Reply #4 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.
« Last Edit: Thu, 29 September 2011, 20:34:11 by Daniel Beaver »

Home: Topre Realforce 87W45  /  Mionix Naos 3200
Work: Topre Realforce 87B  /  Microsoft Intellimouse Explorer 3.0

Offline Quarzac

  • A very busy dude!
  • Thread Starter
  • Posts: 676
  • Location: Bay Area
  • Still around, sometimes.
What is VIM?
« Reply #5 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.
Risen from the dead for a model F.

Wyse buy colors were GSY for the dark grey, GBA for the light grey, and BBI for the fonts.

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
What is VIM?
« Reply #6 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"  :)
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline D-EJ915

  • Posts: 489
  • Location: USA
What is VIM?
« Reply #7 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.

Offline theferenc

  • Posts: 1327
What is VIM?
« Reply #8 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.
HHKB Pro 2 -- Custom UNIX layout Unicomp Customizer 101 -- IBM Model M 1391401 (modded to UNIX layout) -- IBM 1397000 (also UNIX layout) -- SSK in UNIX layout -- Model F 122 key in UNIX layout (Soarer USB "native")
 
CST L-TracX trackball -- Kensington Expert Mouse trackball

Offline Quarzac

  • A very busy dude!
  • Thread Starter
  • Posts: 676
  • Location: Bay Area
  • Still around, sometimes.
What is VIM?
« Reply #9 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?
Risen from the dead for a model F.

Wyse buy colors were GSY for the dark grey, GBA for the light grey, and BBI for the fonts.

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
What is VIM?
« Reply #10 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   :)
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline Quarzac

  • A very busy dude!
  • Thread Starter
  • Posts: 676
  • Location: Bay Area
  • Still around, sometimes.
What is VIM?
« Reply #11 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?
Risen from the dead for a model F.

Wyse buy colors were GSY for the dark grey, GBA for the light grey, and BBI for the fonts.

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
What is VIM?
« Reply #12 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.
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline insilica

  • Posts: 259
  • Location: GCHQ
  • Keyboard Geeza
What is VIM?
« Reply #13 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.
FreeBSD :: Gentoo :: Arch :: [Project Roswell] :: U2410 Eyefinity :: WC P280 :: 3930K [C2] (4.5GHz)
ASUS Maximus IV :: 64GB Vengeance :: MSI 7970 xFire ::  Seasonic 1KW :: M4 256GB

REALFORCE 87U Silent (Variable) | Filco Majestouch 2 Ninja TKL (Brown) | FC660C

Offline Quarzac

  • A very busy dude!
  • Thread Starter
  • Posts: 676
  • Location: Bay Area
  • Still around, sometimes.
What is VIM?
« Reply #14 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.
Risen from the dead for a model F.

Wyse buy colors were GSY for the dark grey, GBA for the light grey, and BBI for the fonts.

Offline Ekaros

  • Posts: 942
What is VIM?
« Reply #15 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?
So I should add something useless here yes? Ok, ok...
Filco 105-key NKRO MX Browns Sw/Fi-layout|IBM Model M 1394545 Lexmark 102-key Finnish-layout 1994-03-22|Cherry G80-3000LQCDE-2 with MX CLEAR
[SIGPIC][/SIGPIC]
Dell AT102W(105-key SF) (Black ALPS)|Steelseries Steelkeys 6G(MX Black) ISO-FI-layout|Cherry G84-4400 G84-4700 Cherry MLs

Offline Chobopants

  • Posts: 590
What is VIM?
« Reply #16 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.
Realforce 87UW 45g - Filco Blue 87 - Filco Linear R - Filco Brown 104

Offline Quarzac

  • A very busy dude!
  • Thread Starter
  • Posts: 676
  • Location: Bay Area
  • Still around, sometimes.
What is VIM?
« Reply #17 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.
Risen from the dead for a model F.

Wyse buy colors were GSY for the dark grey, GBA for the light grey, and BBI for the fonts.

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
What is VIM?
« Reply #18 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.
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline insilica

  • Posts: 259
  • Location: GCHQ
  • Keyboard Geeza
What is VIM?
« Reply #19 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
FreeBSD :: Gentoo :: Arch :: [Project Roswell] :: U2410 Eyefinity :: WC P280 :: 3930K [C2] (4.5GHz)
ASUS Maximus IV :: 64GB Vengeance :: MSI 7970 xFire ::  Seasonic 1KW :: M4 256GB

REALFORCE 87U Silent (Variable) | Filco Majestouch 2 Ninja TKL (Brown) | FC660C

Offline Daniel Beaver

  • Posts: 504
What is VIM?
« Reply #20 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.

Home: Topre Realforce 87W45  /  Mionix Naos 3200
Work: Topre Realforce 87B  /  Microsoft Intellimouse Explorer 3.0

Offline theferenc

  • Posts: 1327
What is VIM?
« Reply #21 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.
HHKB Pro 2 -- Custom UNIX layout Unicomp Customizer 101 -- IBM Model M 1391401 (modded to UNIX layout) -- IBM 1397000 (also UNIX layout) -- SSK in UNIX layout -- Model F 122 key in UNIX layout (Soarer USB "native")
 
CST L-TracX trackball -- Kensington Expert Mouse trackball

Offline Brodie337

  • Posts: 414
What is VIM?
« Reply #22 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.

Offline hashbaz

  • Grand Ancient One
  • * Moderator Emeritus
  • Posts: 5057
  • Location: SF Bae Area
What is VIM?
« Reply #23 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.
« Last Edit: Sat, 01 October 2011, 02:05:40 by hashbaz »

Offline Daniel Beaver

  • Posts: 504
What is VIM?
« Reply #24 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:



The hjkl arrow keys are one of my least favorite quirks of vim. Inverted T arrow keys are so much more intuitive.

Home: Topre Realforce 87W45  /  Mionix Naos 3200
Work: Topre Realforce 87B  /  Microsoft Intellimouse Explorer 3.0

Offline Quarzac

  • A very busy dude!
  • Thread Starter
  • Posts: 676
  • Location: Bay Area
  • Still around, sometimes.
What is VIM?
« Reply #25 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


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.
Risen from the dead for a model F.

Wyse buy colors were GSY for the dark grey, GBA for the light grey, and BBI for the fonts.

Offline Chobopants

  • Posts: 590
What is VIM?
« Reply #26 on: Sat, 01 October 2011, 09:13:40 »
There is, you can change anything in vim. I've grown to like hjkl though.
Realforce 87UW 45g - Filco Blue 87 - Filco Linear R - Filco Brown 104

Offline sordna

  • Posts: 2248
What is VIM?
« Reply #27 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.
« Last Edit: Sat, 01 October 2011, 11:21:02 by sordna »
Kinesis Contoured Advantage & Advantage2 LF with Cherry MX Red switches / Extra keys mod / O-ring dampening mod / Dvorak layout. ErgoDox with buzzer and LED mod.
Also: Kinesis Advantage Classic, Kinesis Advantage2, Data911 TG3, Fingerworks Touchstream LP, IBM SSK (Buckling spring), Goldtouch GTU-0077 keyboard

Offline ch_123

  • * Exalted Elder
  • Posts: 5860
What is VIM?
« Reply #28 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.

Offline theferenc

  • Posts: 1327
What is VIM?
« Reply #29 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?
HHKB Pro 2 -- Custom UNIX layout Unicomp Customizer 101 -- IBM Model M 1391401 (modded to UNIX layout) -- IBM 1397000 (also UNIX layout) -- SSK in UNIX layout -- Model F 122 key in UNIX layout (Soarer USB "native")
 
CST L-TracX trackball -- Kensington Expert Mouse trackball

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
What is VIM?
« Reply #30 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.)
« Last Edit: Sun, 02 October 2011, 23:39:20 by dorkvader »

Offline hashbaz

  • Grand Ancient One
  • * Moderator Emeritus
  • Posts: 5057
  • Location: SF Bae Area
What is VIM?
« Reply #31 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.

Offline mich

  • Posts: 156
What is VIM?
« Reply #32 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.
« Last Edit: Mon, 03 October 2011, 03:54:48 by mich »

Offline pyro

  • Posts: 177
What is VIM?
« Reply #33 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.

Offline Daniel Beaver

  • Posts: 504
What is VIM?
« Reply #34 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)

Home: Topre Realforce 87W45  /  Mionix Naos 3200
Work: Topre Realforce 87B  /  Microsoft Intellimouse Explorer 3.0

Offline pyro

  • Posts: 177
What is VIM?
« Reply #35 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.

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
What is VIM?
« Reply #36 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.

Offline Chobopants

  • Posts: 590
What is VIM?
« Reply #37 on: Tue, 04 October 2011, 08:15:18 »
Also, capitalizing vi/vim looks REALLY funny. It's lower case. :)
Realforce 87UW 45g - Filco Blue 87 - Filco Linear R - Filco Brown 104

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
What is VIM?
« Reply #38 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    :)
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline j-dev

  • Posts: 1
What is VIM?
« Reply #39 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.

Offline hashbaz

  • Grand Ancient One
  • * Moderator Emeritus
  • Posts: 5057
  • Location: SF Bae Area
What is VIM?
« Reply #40 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:


Offline Daniel Beaver

  • Posts: 504
What is VIM?
« Reply #41 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.

Home: Topre Realforce 87W45  /  Mionix Naos 3200
Work: Topre Realforce 87B  /  Microsoft Intellimouse Explorer 3.0

Offline hashbaz

  • Grand Ancient One
  • * Moderator Emeritus
  • Posts: 5057
  • Location: SF Bae Area
What is VIM?
« Reply #42 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.

Offline sam113101

  • Posts: 213
What is VIM?
« Reply #43 on: Tue, 04 October 2011, 20:07:36 »
Nice colorscheme for vim:
http://ethanschoonover.com/solarized
Hoping to hear from you again, your dearest friend, sam113101.

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
What is VIM?
« Reply #44 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.
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline Xuan

  • Posts: 189
What is VIM?
« Reply #45 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.

Offline hashbaz

  • Grand Ancient One
  • * Moderator Emeritus
  • Posts: 5057
  • Location: SF Bae Area
What is VIM?
« Reply #46 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.

Offline hashbaz

  • Grand Ancient One
  • * Moderator Emeritus
  • Posts: 5057
  • Location: SF Bae Area
What is VIM?
« Reply #47 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.

Offline xwhatsit

  • Posts: 297
  • Location: NZ
What is VIM?
« Reply #48 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.
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline hashbaz

  • Grand Ancient One
  • * Moderator Emeritus
  • Posts: 5057
  • Location: SF Bae Area
What is VIM?
« Reply #49 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.
« Last Edit: Wed, 05 October 2011, 15:17:18 by hashbaz »