text-editor

Eclipse Plugin - How to get the last worked on editor

廉价感情. 提交于 2019-12-19 03:58:43
问题 I am writing an eclipse plugin which exposes a view to the user with several buttons. On the click of any button, I would like to paste a certain comment into the editor window where the user is currently working and at the cursor location he is pointing to. Once the user clicks the button, the editor window no longer has focus and the following code does not work. workbench.getActiveWorkbenchWindow().getActivePage().getActiveEditor() How can I detect the editor window where the user was

Text editor vertical lines on statements

十年热恋 提交于 2019-12-18 18:49:51
问题 In other text editors, such as Notepad++, if statements among other things had a vertical line connecting the if to the else , and the else to the end , which makes visual parsing much easier. Example (Vertical lines highlighted by black boxes): I was wondering if there was a way to do this in Visual Studio. 回答1: Have a look at the indent guides extension, this can do what I think you want. 回答2: This feature is now available as part of Visual Studio Productivity Power Tools. This is a free

is there an autosave function/plugin for notepad++?

血红的双手。 提交于 2019-12-18 18:34:17
问题 After an unplanned system restart, all of my Notepad++ temp (and unsaved) tabs are gone. How can I avoid this in future? I don't want to have to save explicitly every single temp file with a file name. Is there a plugin for NP++, which saves my session every time I'm editing an active tab or every X minutes? Or is there an equivalent (and comfortable) editor to NP++, which autostores it's session automatically? 回答1: You can find a Notepad++ plugin called AutoSave for autosaving your files

Visual Studio wrap selection in quotes?

余生颓废 提交于 2019-12-18 12:25:07
问题 Is there is a way to wrap a selected text block with quotes? In visual studio I have not found a extension or plugin I am just looking for a simple way to do it. Is there a way to add that functionality? 回答1: The "Surround with" option is available in Visual Studio also without ReSharper. It doesn't contain the option to wrap in quotes. But it's possible to extend the snippets with custom wrappers. Also with double quotes. To do that: Click File and then click New , and choose a file type of

Is there a plugin for vim to auto-import python libraries? [closed]

心不动则不痛 提交于 2019-12-18 10:55:10
问题 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 last year . In eclipse you can hit Ctrl+Shift+o to automatically import all the libraries you reference in your code. Is there any similar plugin for vim to have this feature with python? 回答1: There is ropevim . It is available on pypi as well The autoimport (adds missing imports) and organizeimport (reorder imports) features

How can I insert current date and time into a file using Emacs?

末鹿安然 提交于 2019-12-18 10:08:32
问题 What commands in Emacs can I use to insert into the text buffer of a file the current date and time? (For example, the equivalent in Notepad is simply pressing F5 which is about the only useful feature for Notepad!) 回答1: C-u M-! date 回答2: Put in your .emacs file: ;; ==================== ;; insert date and time (defvar current-date-time-format "%a %b %d %H:%M:%S %Z %Y" "Format of date to insert with `insert-current-date-time' func See help of `format-time-string' for possible replacements")

Navigating in Vim's Command Mode

一曲冷凌霜 提交于 2019-12-18 10:08:26
问题 I am a long time emacs user learning Vim. Emacs lets me navigate in the mini-buffer (where I issue commands like C-x C-s) using the same navigation keyboard shortcuts as in any other buffer. For example, I can navigate forward one character using C-f, even while in the mini-buffer. I could also use the arrow keys, but they are too far away. Is there any keyboard shortcut to navigate in Vim's command mode (:), without using the arrow keys -- equivalent to emacs C-f, C-b? Thanks. 回答1: Adding to

Problems implementing TinyMCE in CodeIgniter

时光总嘲笑我的痴心妄想 提交于 2019-12-18 09:49:48
问题 I am trying to implement TinyMCE in CodeIgniter. I've created a view file and called it from a controller. I have uploaded all files into my CI project folder and showed the path of the files. But it is not working. Here is the view file: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Full featured example</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <!--

Indicate programming language in a file without extension

放肆的年华 提交于 2019-12-18 03:34:09
问题 When writing executable scripts, and declarative configuration files that use a common language (eg. Python), I often find it undesirable to add an extension to the file name. Many syntax-highlighting text editor (eg. Geany) are subsequently unable to automatically determine the filetype. Is there any standard method for indicating to editors the type of source in the file? 回答1: Typically the shebang line is used as a fall-back. For example, a Ruby script without an extension would begin with

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

╄→гoц情女王★ 提交于 2019-12-17 21:24:25
问题 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