text-editor

What specific productivity gains do Vim/Emacs provide over GUI text editors?

不羁岁月 提交于 2019-11-28 14:59:41
This isn't meant as a troll or flamebait or anything like that. I've been using Vim as my console-editor of choice for a couple months now (for editing configuration files while in my terminal), but I don't think I could stand it for my normal, every day work of writing web applications, which I do with a GUI text editor (which one isn't important). I feel like my GUI text editor can do everything I need for my work. It has a decent search/replace with auto-complete histories for both. It has syntax highlighting, line numbering, a tabbed interface, easy copying and pasting, etc. The only thing

How are text editors generally implemented?

纵然是瞬间 提交于 2019-11-28 13:51:31
问题 This question is probably going to make me sound pretty clueless. That's because I am. I'm just thinking, if I were hypothetically interested in designing my own text editor GUI control, widget, or whatever you want to call it (which I'm not), how would I even do it? The temptation to a novice such as myself would be to store the content of the text editor in the form of a string, which seems quite costly (not that I'm too familiar with how string implementations differ between one language

Change the default editor for files opened in the terminal? (e.g. set it to TextEdit/Coda/Textmate)

我们两清 提交于 2019-11-28 13:48:24
问题 Is there a way to make files opened for editing in the terminal open in Textedit instead? For example, where a command might open a file for editing (like git commit ), instead of opening that file in vim or emacs, it would open in Textedit (or perhaps another text editing application of your choosing, such as Coda or Sublime). And as a bonus question, is there any way to specifically configure git to automatically open the file created after running git commit in an editor from the

How to get an outline view in sublime texteditor?

若如初见. 提交于 2019-11-28 13:20:05
问题 How do I get an outline view in sublime text editor for Windows? The minimap is helpful but I miss a traditional outline (a klickable list of all the functions in my code in the order they appear for quick navigation and orientation) Maybe there is a plugin, addon or similar? It would also be nice if you can shortly name which steps are neccesary to make it work. There is a duplicate of this question on the sublime text forums. 回答1: Hit CTRL + R , or CMD + R for Mac, for the function list.

How do I accept input from arrow keys, or accept directional input?

走远了吗. 提交于 2019-11-28 07:43:48
问题 This may be an xy problem, but I'm trying to to build a kernel based text editor, similar to vim or nano , and I know how to use the escape chars to clear the screen, then reprint, I can have it accept characters, but I'm not sure how to get it to accept arrow inputs for navigation. I thought there were ASCII values for them, but apparently not. Is there a way to use the arrows, or do I have to make a navigation mode and insert mode like vim ? I've also briefly played with curses , but that

How do I insert a linebreak where the cursor is without entering into insert mode in Vim?

会有一股神秘感。 提交于 2019-11-28 04:16:00
Is possible to insert a line break where the cursor is in Vim without entering into insert mode? Here's an example ( [x] means cursor is on x ): if (some_condition) {[ ]return; } Occasionally, I might want to enter some more code. So I'd press i to get into insert mode, press Enter to insert the line break and then delete the extra space. Next, I'd enter normal mode and position the cursor before the closing brace and then do the same thing to get it on its own line. I've been doing this a while, but there's surely a better way to do it? Greg Hewgill For the example you've given, you could use

How can I have a portable Emacs?

Deadly 提交于 2019-11-28 03:16:23
Is there a way run Emacs from a USB drive? I am a Windows user and I would like to be able use it on any PC without an Emacs install. Yes, the "normal" Emacs distribution for Windows is precompiled and just runs without having to do any install. Just get one of the *.zip files from the usual place , unpack it onto a USB disk, and you can use it directly. (The actual binary is inside the "bin/" directory.) The only thing you may want to do is set it up to look for ".emacs" always on the USB disk instead of on your hard drive; see (info "(emacs) Windows HOME") on how to do that. You can read

How to permanently disable region-folding in Visual Studio 2008

痞子三分冷 提交于 2019-11-28 03:07:29
Anyone know how to turn off code folding in visual studio 2008? Some of my colleagues love it, but I personally always want to see all the code, and never want code folded out of sight. I'd like a setting that means my copy of Visual Studio never folds #regions or function bodies. Greg Edit: I recommend this other answer Go to the Tools->Options menu. Go to Text Editor->C#->Advanced. Uncheck "Enter outlining mode when files open". That will disable all outlining, including regions, for all c# code files. The accepted answer turns off ALL code folding. If you want to disable #region folding but

What text editor is available in Heroku bash shell?

此生再无相见时 提交于 2019-11-28 02:54:31
I'm trying to update httpd.conf in my Cedar-based Heroku app. I got to my Heroku bash with heroku run bash and found the conf dir under apache. But when I try to open any editor vi, vim, or emacs, I can't find any of these programs. How do you edit conf files on Heroku? I recently turned the original gist into a heroku cli plugin . Just install: heroku plugins:install https://github.com/naaman/heroku-vim And use: heroku vim The heroku vim command will drop you into a bash shell with vim installed on your $PATH . All you have to do is retrain your fingers to type heroku vim instead of heroku

See line breaks and carriage returns in editor

早过忘川 提交于 2019-11-28 02:53:11
Does anyone know of a text editor on Linux that allows me to see line breaks and carriage returns? Does Vim support this feature? jay.lee :set list in Vim will show whitespace. End of lines show as ' $ ' and carriage returns usually show as ' ^M '. To disagree with the official answer: :set list will not show ^M characters (CRs). Supplying the -b option to vi/vim will work. Or, once vim is loaded, type :e ++ff=unix . Larry K VI shows newlines (LF character, code x0A ) by showing the subsequent text on the next line. Use the -b switch for binary mode. Eg vi -b filename or vim -b filename -- .