7 ms·
Can someone :help me?
- tikhonj 12y agoIf you're curious, Emacs does all this—and more—with various C-h commands. If you want to see a full list of these, start with C-h ? Here are my favorites: If you want to see a specific keybinding, like checking what C-w is bound to: C-h k C-w If you want to see the documentation for a function: C-h f function-name If you want to see details about your current mode: C-h m This is incredibly useful because it lists all the mode-specific keybindings. That's how I learn how to use new modes! If you want to see or interact with a variable: C-h v If you want to see something where you remember just part of the name: C-h a *regexp* (a stands for "apropos") If you want to see the incredibly detailed manual for Emacs or all of the info manuals on your computer: C-h r C-h i If you want to see info about your input mode (how do I type ℕ in TeX-input-mode?): C-h I Actually, for that one, I have another handy trick: copy and paste an ℕ into your buffer, go over it and use C-u C-x = which brings up detailed information about the given character... including how to type it in your current input mode (if applicable). This also includes useful info like its Unicode designation and category. I've found all of these tricks exceptionally helpful when learning more about Emacs. They also help me overcome my fear of memorization: its so easy to look stuff up, I don't have to bother. Then, if I use something enough, I remember it without especially effort. It's like a cache in my mind.
- grdvnl 12y agoBetter still, if you want to execute a command and if you approximately know what it could be called as, you get list of potential commands in an alternative buffer, by Alt-x, and then start typing part of the command. This I feel is great to explore commands as you need them, before binding new keys to those commands. Without getting into emacs vs vim war, the author would be impressed in a bigger way once the emacs documentation is explored!
- Watabou 12y agoI'm sure I would be. I actually like emacs very much, and used to use it in my uni days. These days though, I like the modal way of editing more. I think emacs' documentation does come close but I still think Vim's help is much more easy to use and to search for. For example, a new user coming to emacs can't search for help on C-x C-f by invoking C-h C-x C-f
- rwl 12y ago> For example, a new user coming to emacs can't search for help on C-x C-f by invoking C-h C-x C-f That's true. It's C-h k C-x C-f. :)
- Watabou 12y agoWhoops, thanks. Sort of hard to type it though. :)
- mkesper 12y agoThat's why there's a menu bar since ages. And also a startup screen giving some help.
- tomjakubowski 12y agoOne neat trick is that, unless it's been explicitly rebound, this will show you all keybindings beginning with <prefix> <prefix> C-h So if you want to see all keybindings in the current buffer starting with C-c ! C-c ! C-h
- klibertp 12y ago> If you want to see the incredibly detailed manual for Emacs or all of the info manuals on your computer: And you really should want seeing your info manuals - they are incredibly high quality resources for the most part. Emacs, Emacs Lisp, Org Mode, Magit infos, for example, are all full fledged books, properly split into chapters, filled with all the details you'd ever need. They are indexed and searchable and they are easy to navigate. Just install info+ and some related scripts before starting with infos - this will give you syntax highlighting and colors in the info viewer. I don't remember if bookmarks are part of the vanilla Emacs, but if not you probably would want to install some bookmarking plugin too. After that is done it becomes the most pleasant technical reading experience ever.
- euphemize 12y agoI think if the idea is to help newcomers with Vim, this is the wrong approach. Nobody tries to learn something new by checking out what a random key does, using :help X. When I was trying to learn Vim, the most useful info was actually search results for "how to do X with Vim", because everybody knows A) another editor, probably B) what they want to achieve. After that you slowly discover features one after the other, which can only happen by using the editor a lot. It's good to have a "help X" around, but most of the time, if you're starting out, you don't know that X is what you need in the first place. People learning git don't start with typing "git rebase --help" just to see what it does. You learn to add, commit, push, (probably from a tutorial) and then go from there.
- Watabou 12y agoNot to start with no. But as I started to become familiar with Vim enough, I realized I reached for :h more than go search google, and for the most part, I found what I was looking for in Vim's help pretty easily and much faster than google. Vim's help is easy enough to use that you can `:helpgrep topic` or just `:help top<tab>` to list all the help topics and go from there. Sure you can achieve the same thing by searching online. However, I believe that reading Vim's help motivates you to learn more commands and be more efficient with it. There's so many things in `:h motion.txt` that online articles don't mention and I would probably never come across them. Similarly, with Git, I did learn to add, commit push but then I learned to reach for `git help topicname` if I want some documentation on that topic name.
- jeorgun 12y agoHence vimtutor. The "going from there", in git, does consist in part of "git rebase --help" or "man git-rebase", which are roughly equivalent to :help.
- natural219 12y agoThe documentation is so good, you need a beautifully crafted website with english sentences, standard typography / web styles, and acommpanying visual diagrams...simply to learn how to use the "help" feature.
- Watabou 12y agoWell I wrote this partly for a friend who wants to give Vim a try. I noticed if I told him to read the help on a topic, he would just google the question himself (maybe he doesn't like the terminal interface to read the help doc). I've also noticed some people will manually go search a plugin on Github just to read the plugin's doc folder, when the same help doc is available right inside vim! So I thought I would help explain why Vim's help is so awesome that people should use it more and using it more means that you learn more things about vim. But I appreciate that you like my website, thanks! :)
- ufmace 12y agoThe tricky thing about vim help, to me, is that it feels nearly impossible to navigate until you're already pretty comfortable with moving around in Vim. Making all of the most basic things so different from the WYSIWYG editors most people know generates a huge mental load at first, just trying to get the most basic things done. When I started using Vim, I found for a while that I couldn't stand writing code with it for more than an hour or so, because it was too difficult to think about what the code is doing and how to use the Vim commands to actually edit the text at the same time. I think it took me several months of poking around and training myself in basic movement commands to get to where I could actually work in it effectively.
- natural219 12y agoYour website is awesome and the article was fantastic! I was just picking on you for the "Vim has the best documentation ever" line.
- leni536 12y agoIf there is a software that I use for the first time and it accepts commands my first command is usually "help". Last time I had to debug a bash script so I found bashdb "from apt-cache search debug bash" and just ran it. I had no problem using the internal help. Most of the time you don't have to look up things on the Internet and just RTFM.
- nutate 12y agoApropos help in emacs is nice. For similar in vim type :help blah<ctrl-d>
- leorocky 12y ago> No other software product that I've ever come across or used has had a better documentation. Vim requires so much documentation just to be usable. There is no GUI to hint at how to do anything. No toolbars, no application menus, no context menus or buttons. Vim's documentation is probably somewhat responsible for its popularity. I've never not found something I needed in Vim's documentation.
- dredmorbius 12y agoWhich also means no GUI to get in the way. I'm not saying there isn't a time and a place for that, but after your 2nd or 3rd decade of using a tool, sometimes you just want to see the text you're working on.
- PhasmaFelis 12y agoYou may have hit on my fundamental frustration with Unix command line. Every tool is designed around the basic assumption that the user has a couple of decades of experience and wants the tool to get out out of the way and let them work. That's great for veterans, but actively hostile to newbies. You'd think there could be some sort of middle ground.
- leorocky 12y agoI've hidden a lot of shit from intellij. Like you can start with the GUI and gradually remove things you don't need, it ends up looking like a text area with a side bar while you're editing code, and some tabs on top.
- ThatGeoGuy 12y ago> That's great for veterans, but actively hostile to newbies. I would have to respectfully disagree. With the copious amounts of man-pages, the availability of vim-tutor (for this particular case), and all other avenues of help available within most Unix tools, I cannot agree with the notion that software (vim, in particular) is actively hostile. Compared to the copious amounts of software that is far less documented, and far less robust than the standard Unix set of tools, I think calling the command line hostile is at best downright laziness. Please don't call something hostile if you've barely given it a chance. Not every tool needs to be wrapped in a fully animated tutorial with buttons everywhere. In fact, the more elegant tools often don't have these things and do their best to stay out of your way. Which leads to the next part of your comment: > You'd think there could be some sort of middle ground. Why would there be? Any middle ground would risk upsetting two groups: the power users that want the tool to stay out of the way and do what it's meant to do, and the group of newbies (or regular users) that can't figure out what the tool was designed for or the best way to use it. The regular users wouldn't be satisfied with the help available for any middle-ground tool, and power users would just find that the half-baked tutorials, help system, or user support just got in the way. This would cause a rift in the community, which would force some users to search for a replacement that gives better help, while the power users would drift to a similar tool with the cruft and bell and whistles removed. If you're just a regular user, and you end up using a tool like Notepad++ or Nano or some other editor instead of Vim or Emacs, and you can't for the life of you figure out vim or emacs, that is completely fine. Continue using the tool you are capable of wielding. However, that's not to say that vim or emacs don't have their own documentation and help systems, it's just that they're not served to the user in the same way. It may not be directly obvious when switching between systems (example: standard help documentation in Windows is nothing like using man or info pages), but I would reckon that it is only immediately non-obvious because you're already used to another way of searching for help. So please stop calling software hostile, and give it a chance. Truly hostile software exists, but I can guarantee you that basic command line utilities are not it.
- borplk 12y agoHonestly the entire time I was under the impression that the author is being sarcastic.
- okasaki 12y agoDoes no one check their page layout on anything but 4k resolution any more? Here's what the page looks like on one of my 1280x1024 screens: http://i.imgur.com/w6WXYF6.png http://i.imgur.com/w6WXYF6.png Since the screen is physically on my left, it's very annoying to try to read the text.
- Watabou 12y agoHmm, thanks for that, I'll see what I can do. I don't have a 4k monitor but I do have a retina MBP. I tested it on mobile and the retina MBP but I don't have access to a lower resolution computer (hehe).
- vsbuffalo 12y agoI use vim (after years of being a happy emacs user — switched due to RSI), but I've never liked its help system. Compared to emacs, it's incredibly hard to navigate and it just doesn't have anything as powerful as C-h k (what does this key do?).
- Watabou 12y agoWhat do you feel that Vim's help in that area is lacking? I think searching for a key binding is pretty straightforward with `:h {key}`. I like how it's short and simple they are most of the time too so you can read and get back to whatever you were doing.
- manveru 12y agoYou can actually use ^V to insert control characters in vim, for example: `:h ^V^W^V^W` will search for CTRL-W CTRL-W. Now I just wish `:h ^V` would actually tell you about this feature.
- lennydizzy 12y agoAny one know how do I search for a shortcut in different modes? For example, 'ctrl-r' in normal mode means redo, in insert mode means paste from register. However ':h ctrl-r' only shows the help for normal mode.
- Watabou 12y agoI linked that help topic in the article. `:h help-context` tells you what you need to append for each mode. So for ctrl-r in insert mode would be: `:h i_Ctrl-r`
- NYCHacker 12y agoCan someone explain to me why people still use Vim and Emacs? Is it more efficient than GUIs like Sublime Text? I only ever use Vim for quick edits and fail to see how one can be more effective in it when you can't click and highlight text.
- Watabou 12y agoI can't convince you that Vim or Emacs is more convenient than Sublime Text. You will have to find that out on your own. And yes, you can highlight text, using Visual mode or the mouse.
- KhalPanda 12y agoI just find Vim so much faster. There is a learning curve (http://www.thejach.com/imgs/vim_learning.jpg http://www.thejach.com/imgs/vim_learning.jpg), but once you're over that curve, you can't stand regular text-editors anymore! Fewer key-presses and your hands not needing to leave the keyboard (or at least, infrequently) = fast. I should add, I don't just use Vim, I use the IdeaVIM plugin for PHPStorm and Webstorm, for development zen. :-)