text-editor

Visual Studio C# statement collapsing

雨燕双飞 提交于 2019-11-27 05:54:59
When editing really long code blocks (which should definitely be refactored anyway, but that's beyond the scope of this question), I often long for the ability to collapse statement blocks like one can collapse function blocks. That is to say, it would be great if the minus icon appeared on the code outline for everything enclosed in braces. It seems to appear for functions, classes, regions, namespaces, usings, but not for conditional or iterative blocks. It would be fantastic if I could collapse things like ifs, switches, foreaches, that kind of thing! Googling into that a bit, I discovered

How do I enable the column selection mode in Eclipse?

孤街醉人 提交于 2019-11-27 05:46:25
News wrote that Eclipse 3.5 finally supports column selection. Unfortunately I don't know HOW to enable it. I tried pressing the ALT-key like I am used to in Visual Studio and all other Microsoft products but that had no effect. How can I mark a vertical block in Eclipse? RichieHindle To activate the cursor and select the columns you want to select use: Windows: Alt + Shift + A Mac: command + option + A Linux-based OS: Alt + Shift + A To deactivate , press the keys again. This information was taken from DJ's Java Blog . On Windows and Linux, it's Alt Shift A , as RichieHindle pointed out. On

Best Free Text Editor Supporting *More Than* 4GB Files? [closed]

依然范特西╮ 提交于 2019-11-27 04:56:57
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. I am looking for a text editor that will be able to load a 4+ Gigabyte file into it. Textpad doesn't work. I own a copy of it and have

What is the best way to force yourself to master vi? [closed]

杀马特。学长 韩版系。学妹 提交于 2019-11-27 04:54:54
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . A good while ago, I read an article by the creator of viemu, clearing up a lot of the misconceptions about vi, as well as explaining

How to design undo & redo in text editor?

孤街浪徒 提交于 2019-11-27 04:30:46
问题 Part of my project is to write a text editor that is used for typing some rules, compiling my application and running it. Writing compiler was end and release beta version. In the final version we must add undo and redo to the text editor. I use a file and save it periodically for the text editor. How to design undo and redo to my text editor? What is changed in the structure of persistent of file? 回答1: You can model your actions as commands, that you keep in two stacks. One for undo, another

Multiline Regular Expression search and replace!

隐身守侯 提交于 2019-11-27 03:04:17
问题 I've hit a wall. Does anybody know a good text editor that has search and replace like Notepad++ but can also do multi-line regex search and replace? Basically, I am trying to find something that can match a regex like: search oldlog\(.*\n\s+([\r\n.]*)\); replace newlog\(\1\) Any ideas? 回答1: My personal recommendation is IDM Computing's UltraEdit (www.ultraedit.com) - it can do regular expressions (both search and replace) with Perl, Unix and UltraEdit syntax. Multi-line matching is one of

How to prevent vim from creating (and leaving) temporary files?

只谈情不闲聊 提交于 2019-11-27 02:35:43
Why does vim create <filename>~ files? Is there a way to disable that? If it's for backup (or something), I use git for that. Also, these .<filename.with.path.hints>.swp files too. How do I tell vim not to create those, or at the least to cleanup after itself? EDIT whoops, duplicate: Why does Vim save files with a ~ extension? I adopted rogeriopvl's answer from there. verbatim copy: set nobackup "no backup files set nowritebackup "only in case you don't want a backup file while editing set noswapfile "no swap files I'd strongly recommend to keep working with swap files (in case Vim crashes).

Is there a valid reason for enforcing a maximum width of 80 characters in a code file, this day and age? [closed]

你说的曾经没有我的故事 提交于 2019-11-27 02:27:51
Seriously. On a 22" monitor, it only covers maybe a quarter of the screen. I need some ammo to axe down this rule. I'm not saying that there shouldn't be a limit; I'm just saying, 80 characters is very small. Will Harris I think the practice of keeping code to 80 (or 79) columns was originally created to support people editing code on 80-column dumb terminals or on 80-column printouts. Those requirement have mostly gone away now, but there are still valid reasons to keep the 80 column rule: To avoid wrapping when copying code into email, web pages, and books. To view multiple source windows

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

谁都会走 提交于 2019-11-27 00:19:37
问题 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

How can I have a portable Emacs?

时光总嘲笑我的痴心妄想 提交于 2019-11-26 23:59:41
问题 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. 回答1: 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