text-editor

Is there a text editor that will “pretty print” for display without changing the underlying text?

感情迁移 提交于 2020-01-03 02:55:29
问题 There are two competing requirements 1) I want to pretty print so that I can read and understand code written by my peers 2) I don't want to check in the pretty printed code to source control because... It might not meet the coding standard where I work When reviewing history in source control, formatting changes obscure the 'real' changes. For discussion of problems checking in formatting changes, see this other stackoverflow question Committing when changing source formatting? At the same

How to retrieve GOPATH from Docker container?

China☆狼群 提交于 2020-01-01 16:32:38
问题 My objective is to have a self contained Go Workspace per project. Is it possible to retrieve a Go workspace and Go environment variables from a running Docker container to be used by an IDE or Text Editor for development? I have already tried mapping a volume to the container with the go tools and dependencies. But that requires always setting the GOPATH to the current workspace, and requires to have the go tools and dependencies on the host. 回答1: You can at least set and pass those

Why can't turn off the Sublime 3 updates notification by adding “update_check”:false in user setting file?

人走茶凉 提交于 2020-01-01 07:52:08
问题 I want to turn off the Sublime 3 updates notification, so I go to Preferences -> Settings-User and edited it like this: { "auto_close_tags": true, "font_size": 18, "hot_exit": false, "remember_open_files": false, "show_encoding": true, "update_check": false } but it doesn't work. 回答1: There is no way to turn this off, unless you have registered your version of Sublime. Sublime Text 3 is still in "beta" status, so it is strongly advised that you upgrade when a new version is available to get

Sublime Text: text list of open files

喜夏-厌秋 提交于 2020-01-01 04:54:07
问题 I have some files opened in sublime text. I can see that list on the side panel. I want to know if there is a plugin that can give me this list as text. i.e., I hit a button and new file pops up that has lists all the open file names. 4 open files: open_file_1.cc open_file_1.h open_file_2.cc open_file_2.h 回答1: I wrote a small plugin for this as I could not find anything. Pasting it here so that someone can use it if needed in future. https://github.com/rrg/ListOpenFiles 回答2: Press: Ctrl `

IntelliJ IDEA way of editing multiple lines

二次信任 提交于 2019-12-31 08:23:45
问题 I've seen this done in TextMate and I was wondering if there's a way to do it in IDEA. Say I have the following code: leaseLabel = "Lease"; leaseLabelPlural = "Leases"; portfolioLabel = "Portfolio"; portfolioLabelPlural = "Portfolios"; buildingLabel = "Building"; What is the best way to append '+ "foo"' to every line? Column mode won't work since the lines are not correctly aligned on the right side... unless there is an easy way to right justify the text :P 回答1: Since Idea IntelliJ IDEA 13.1

IntelliJ IDEA way of editing multiple lines

非 Y 不嫁゛ 提交于 2019-12-31 08:22:47
问题 I've seen this done in TextMate and I was wondering if there's a way to do it in IDEA. Say I have the following code: leaseLabel = "Lease"; leaseLabelPlural = "Leases"; portfolioLabel = "Portfolio"; portfolioLabelPlural = "Portfolios"; buildingLabel = "Building"; What is the best way to append '+ "foo"' to every line? Column mode won't work since the lines are not correctly aligned on the right side... unless there is an easy way to right justify the text :P 回答1: Since Idea IntelliJ IDEA 13.1

Eclipse: Can you put your cursor on all lines?

半世苍凉 提交于 2019-12-31 02:58:10
问题 In IDEA you had the possibility to put your cursor on all lines. Is this possible in Eclipse? 回答1: Eclipse 3.5 should have a column mode (which is what I think you're asking about) - use Alt+Shift+A : http://update.eclipse.org/downloads/drops/R-3.5-200906111540/eclipse-news-part1.html#Text I haven't tried this since I'm stuck at version 3.4.1 for the time being. There's a patch that claims to work for 3.4.0 (http://tkilla.ch/column_mode/), but it's not working for my 3.4.1 install. 回答2: If

Sublime Text Plugin : Adding python libraries

放肆的年华 提交于 2019-12-30 09:58:34
问题 I'm trying to write a sublime text plugin which would make some windows api calls. I did some research and found out that this python library provides the API's that I need to use. So, I'm trying to to use this library. When I add import statement for it in my sublime text plugin it gives me error ImportError: No module named win32api I'd assume that it's because sublime text comes with inbuilt python and I haven't actually installed these libraries on my system it's throwing up these errors.

Where is the basic Control-TAB (MRU) behavior in Xcode?

戏子无情 提交于 2019-12-29 07:35:13
问题 In most multi-document editors for windowing environments, Control - TAB will utilize an MRU list to bring the user back to the last visible file. What is the appropriate command to accomplish this in Xcode 3.x? I currently have Ctrl - TAB mapped to "View|Previous File", however this does not appear to be an MRU. Worse yet, if it hits the "beginning" of the list (should be a circular buffer), it falls back on inserting an actual TAB character into the text editor. 回答1: As of Xcode Version 3,

Eclipse-plugin how to get current text editor cursor position

北城余情 提交于 2019-12-28 06:49:08
问题 I try to show popup dialog at text cursor position of an editor. How can I get text cursor position in pixels of the active editor (Point) and a show popup dialog at this point? 回答1: I'm not exactly sure what do you mean under "show popup dialog at this point", but do something like this: IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); if (editor instanceof ITextEditor) { ISelectionProvider selectionProvider = ((ITextEditor)editor)