Emacs or VIM should I try it?
Emacs or VIM should I try it?
Right now I'm using Kate for all of my coding but I always hear how nice Vi and Emacs are if you learn them.Is there a huge advantage like people who use these editors say?
I'm an emacs addict and my answer to your question is : YES. When I first used emacs I didn't think it was that great. But then I got more into it and I fell in love with being able to do everything in emacs. For example, I had a terminal on the top, a main file on the bottom left and a side pane which allows me to view to files. This allows me to see the header files with all my structs and everything so I don't have to continuously cycle through files to make sure that the names of all my identifiers are correct. Also emacs allows me to do all my editing without taking my hand off the keyboard(using the mouse takes too much time).
VIM probably also has most of these advantages but I'm not very experienced in vim.
VIM probably also has most of these advantages but I'm not very experienced in vim.
For some people, vi\emacs can be a huge productivity booster.
Personally, I use vim. As iammisc said, at first you'll say to yourself: "What is this? How can this be so productive?" However, after using it for awhile, and learning its workings, you'll get quicker and more accustomed to it.
Recently, seeing my success with vim, I've switched from GNOME to xmonad. So far, I like it a lot. Lesson of the story: shift around to various tools and try them all.
Personally, I use vim. As iammisc said, at first you'll say to yourself: "What is this? How can this be so productive?" However, after using it for awhile, and learning its workings, you'll get quicker and more accustomed to it.
Recently, seeing my success with vim, I've switched from GNOME to xmonad. So far, I like it a lot. Lesson of the story: shift around to various tools and try them all.
C8H10N4O2 | #446691 | Trust the nodes.
I didn't know xmonad. I tried ion 2-3 years ago for notebooks. But the standard keys are horrible. But right now I have no notebook. :/
And on the desktop I stay on xfce... pushing my mouse.
I know that the advantage is the speed by using only the keyboard. But how long do you need to learn/get used to it and how much faster do you work?
And on the desktop I stay on xfce... pushing my mouse.
I know that the advantage is the speed by using only the keyboard. But how long do you need to learn/get used to it and how much faster do you work?
-
- Member
- Posts: 566
- Joined: Tue Jun 20, 2006 9:17 am
Vi is the best
Vi is cool and slick , The most important feature for the productivity of vi is that for most of the time your finger remain in the centre of the keyboard unlike many (non vi ish and so called true programs ) editors . Vi is the best editor om the whole wide world .<evil laugh> Mu ha ha ha h ha </evil laugh>
Your choice on whether to use emacs or vi depends on whether you are more comfortable with a modal or modeless editor.
Vi is a modal editor - it has a command mode and an insert mode (among others) where the same keys do different things - e.g. in command mode 'j' moves up a line, in insert mode it inserts the letter 'j'.
Emacs is modeless - 'j' will always insert a character 'j'. All its functionality is accessed using key modifiers - generally with combinations of keys and the CTRL and ALT keys (referred to a C- and M- (for META)).
For example, to save a file and then quit in Vi(m), you press ESC a few times to make sure you're in command mode then type
the 'w' being write, and the 'q' being quit.
In emacs, you would do this:
control-x is a modifier used to access emacs standard functions (because emacs has so many functions that it needs multiple modifiers to map them all). C-x C-s saves the file, and C-x C-c quits. It sounds more complex than the vi(m) version but really because of the locality of the keys it's very simple and automatic.
I personally use Emacs, but this has come about after using both and deciding that I preferred a modeless editor. I would, however, prefer an Emacs without any of the bells and whistles it currently has (emacs is almost an OS, it's got so much stuff, in fact one common insult is that "Emacs is a great operating system, all it lacks is a decent text editor")
Cheers,
James
Vi is a modal editor - it has a command mode and an insert mode (among others) where the same keys do different things - e.g. in command mode 'j' moves up a line, in insert mode it inserts the letter 'j'.
Emacs is modeless - 'j' will always insert a character 'j'. All its functionality is accessed using key modifiers - generally with combinations of keys and the CTRL and ALT keys (referred to a C- and M- (for META)).
For example, to save a file and then quit in Vi(m), you press ESC a few times to make sure you're in command mode then type
Code: Select all
:wq
In emacs, you would do this:
Code: Select all
C-x C-s C-x C-c
I personally use Emacs, but this has come about after using both and deciding that I preferred a modeless editor. I would, however, prefer an Emacs without any of the bells and whistles it currently has (emacs is almost an OS, it's got so much stuff, in fact one common insult is that "Emacs is a great operating system, all it lacks is a decent text editor")
Cheers,
James
Use it solely for a week and you'll get used to it. In regards to speed, I work a lot faster. Consider this: in text editors like gedit and kate, each file is kept in a separate tab. To switch you have to take your hands of the keyboard(about 2 seconds if you're on a desktop. a little easier on a laptop) and then you have to position the mouse on the tab and click( and be careful not to hit the close button). In emacs, I just hit C-x C-b and type in part of the name and click TAB for emacs to fill in the rest. Most of the time, I don't even have to type anything other than C-x C-b ENTER because emacs will automatically select the most recent buffer. Also, opening a file is much quicker, emacs has tab completion so I just type in the first few letters and voila, the file comes up. Lastly the great thing about emacs and vim is that you won't have to switch between a text editor and a console. Emacs and Vim(AFAIK) can both run a console so it will save you on compilation time.I know that the advantage is the speed by using only the keyboard. But how long do you need to learn/get used to it and how much faster do you work?
Just for information sake, Vim has Tabs. To move to another tab it's 'gt' (move to the next tab left). to create a new tab its ':tabnew' (or can be maped to a simple key combo (imap ,t <Esc>:tabnew<CR> would map it to ',t' keys). To move to a specific tab it's ':tab <tab number>'.iammisc wrote:In emacs, I just hit C-x C-b and type in part of the name and click TAB for emacs to fill in the rest. Most of the time, I don't even have to type anything other than C-x C-b ENTER because emacs will automatically select the most recent buffer. Also, opening a file is much quicker, emacs has tab completion so I just type in the first few letters and voila, the file comes up. Lastly the great thing about emacs and vim is that you won't have to switch between a text editor and a console. Emacs and Vim(AFAIK) can both run a console so it will save you on compilation time.
Microsoft: "let everyone run after us. We'll just INNOV~1"
Does anyone actually use vim tabs? I was under the impression everyone just :sp\:vsp their windows or opened a new terminal..B.E wrote:Just for information sake, Vim has Tabs. To move to another tab it's 'gt' (move to the next tab left). to create a new tab its ':tabnew' (or can be maped to a simple key combo (imap ,t <Esc>:tabnew<CR> would map it to ',t' keys). To move to a specific tab it's ':tab <tab number>'.iammisc wrote:In emacs, I just hit C-x C-b and type in part of the name and click TAB for emacs to fill in the rest. Most of the time, I don't even have to type anything other than C-x C-b ENTER because emacs will automatically select the most recent buffer. Also, opening a file is much quicker, emacs has tab completion so I just type in the first few letters and voila, the file comes up. Lastly the great thing about emacs and vim is that you won't have to switch between a text editor and a console. Emacs and Vim(AFAIK) can both run a console so it will save you on compilation time.
C8H10N4O2 | #446691 | Trust the nodes.
- fingerprint211b
- Posts: 13
- Joined: Thu May 29, 2008 2:34 pm
Re: Emacs or VIM should I try it?
I'm using Kate myself, and always have an open terminal on my other monitor.Pinkfloyd wrote:Right now I'm using Kate for all of my coding but I always hear how nice Vi and Emacs are if you learn them.Is there a huge advantage like people who use these editors say?
Before that, when I was using GNOME, I used gedit, which I find to be excellent. Both editors can do syntax highlighting, and gedit has an embedded terminal (plugin), and auto-complete plugins...
I heard stories and examples of how vim and emacs are good and why, but I can't get myself to learn them
But from what I saw they seem worth it.