Is there any way to set background color of lines in GoLand (JetBrains IDE)? - jetbrains-ide

Is there any way to set the background color for certain lines in GoLand (JetBrains IDE) so I can sign what code I have read?
Is it possible to do this? Does not matter if it's an IDE function or via some plugin.

There are a few ways to mark some lines and add them to the "Reading" list:
Bookmarks. It is built-in functionality in IntelliJ-based IDEs. You can go to the line with Authenticator interface declaration and select Edit | Bookmarks | Toggle Bookmark in the main menu. All bookmarks are available in View | Tool Windows | Bookmarks.
3rd-party plugins. I'm aware of MultiHighlight plugin that supports selection of the piece of code.

Sticky selection can do that trick.
there is the brief intro about it:
you can mark a selection to be permanently highlighted, even when your caret moves away. Inspired by "Style token" of Notepad++.
You can define an arbitrary number of Paint Groups. Selecting the appropriate editor action (keystroke or context menu), the all occurrences of currently selected text will be added to the Paint Group and will be permanently highlighted (until you clear the selection with an other editor action). So you can have different text fragments to be selected with the same Paint Group. The Paint Groups are kept when IntelliJ is closed.
You can set different colours for each Paint Group
You can set a marker to be visible on the right side of the editor
You can add multiple selections to the same group
You can convert a Paint Group to multi caret selection (and thus edit, copy, delete, etc. it)
For convenience you can undo the last addition (until the document is edited)
You can cycle through each element in a given Paint Group or in all Paint Groups
Keymap actions are added dynamically for paint, clear and convert as you add more Paint Group

Related

Sublime Text 3: Hide tab bar in only one view

If I have multiple views open in a window in Sublime Text 3, is there a way for me to hide the tab bar in only one of the views, rather than View > Hide Tabs, which hides the tab bar in all views?
Except for Justin's workaround, there is not a way to do this in a single window. The toggle_tabs command is associated with the window, not an individual view, so it operates on all views within a particular window.
Hypothetically, you could write a Python plugin to execute toggle_tabs every time you switched to a particular view, but it would have to be file- or file type-specific.
If its just one view just drag it to make it a new window that way you will have two windows, one with the tabs you wish to see and other with ones you dont want to see

Sublime Text: How can I disable auto scrolling while I'm typing in the Find box?

I am currently trying to write a complex regex for a huge file. Every time I type in the find input box to make a small change, Sublime scrolls me either to the top of the document or to a semi-random location (from what I can remember, it doesn't always scroll to the first match), even when there are matches where I'm already scrolled to in the file. It makes for a pretty painful workflow: I write down the line number on a piece of paper, edit my regex, and then have to "go-to" back to the line I was already at. How can I prevent this, or at the very least, does anybody know why exactly this is happening in the first place?
This is controlled by the Highlight Matches button in the Find and Find and Replace panels, and causes Sublime to show you all of the matches, highlighting one of them and outlining the remainder in a region to show you where they are.
The visual appearance of the button is controlled by the theme you use, but it's always in this position in the panel (and it should have the same icon in all other find panels as well); it also has a tooltip that tells you the name.
When the search term is modified and this option is turned on, Sublime jumps to a match, though this doesn't occur if the panel opens with an existing search term already in it; in that case matches are highlighted but the view doesn't change.
The option also exists in Incremental Find panel as well, but turning it off there only stops other matches from being highlighted as by definition Incremental Find is for jumping to a search term incrementally as you modify it.

How can I set the default orientation of labview windows?

Whenever I open a new labview project, it opens two small windows, one for the block diagram and the front panel. Since using labview effectively requires simultaneous use of both, is it possible to set things up such that, upon starting a new VI, it opens these two windows in pre-determined positions and sizes?
I do not know setting to do so (and think there is no such setting), but your problem is easily solvable if you press ctrl+t when new vi is opened.
ctrl+t will set front panel on the left half part of the screen and block diagram on the right part. Pressing ctrl+t a second time will set the panel to top half and diagram to the bottom half.
Shortcuts In LabVIEW
Another workaround:
Create a new empty VI
Resize and reposition the front panel window as you wish
Do the same for the block diagram window
Save the VI as a template (.vit)
Double click the template to use it (position and size of windows will be as they were when saving)
Alternatively if you want to be doing manually everytime. You can press WIN+LEFT on one of the windows and WIN+RIGHT on the other. This will evenly distribute the two windows over the screen.
You can set window position for individual VIs by pressing Ctrl+I to open the VI properties, and setting the desired appearance under "Window Size"

PyQt QTextEdit text selection without moving the cursor (like ubuntu terminal)

I've developed a shell (imitating the ubuntu terminal --> can only edit text after current prompt) by a PyQt QTextEdit.
The thing is when I select some text, the cursor moves as I'm selecting this text (so it disappers from the current command line) and I would like the cursor to stay where it is (only when I select text because I want it to move when I move it programmatically by textEdit.moveCursor(...)) at the same time I'm selecting the text.
Does anybody have any idea of how could I do that?
My solution for now, is to save the position at any change of it (except when it changes by a click), and when I copy some text en paste it, it'll be automatically pasted in the last position the cursor was before the click. That works perfectly but it's "ugly" for the user because, as I said, when he selects the text the cursor disappears of the current line and is where the user is selecting the text. Not like in ubuntu terminal.
Thanks in advance! And sorry for my english.
Adri
I don't see an easy solution to implement this with a text editor API. A terminal is a hack, basically. It mixes a read-only element (anything above the current prompt) with a text editor.
My approach would be to create two text editors, make one read only and display the results of all operations there. If you hide the borders of the two editors, then it will look like a single one. You may have to forward a bunch of events (like scrolling with the keyboard) to the read-only display.

CMFCTabCtrl color customising

Is there the way to change the line and background colors of CMFCBaseTabCtrl?
I can change tabs color via SetTabBkColor(...) or SetAutoColors(...) but control's header and lines remain grey.
SetSysColors(...) is not an option because it changes colors globally for entire OS.
Basically we need to apply some lite/dark color scheme. I can not find the way to change tab control background and line colors. When the tab background color is set by SetTabBkColor(...) it leaves the space near the tab border.
Also its expected that SetActiveTabColor(...) will change the background of the active tab but it does pretty nothing.
And there is no way to change the text color of the active tab. I belive this stuff is customisable but can not find how.
The colors are retrieved from the current instance of the CMFCVisualManager.
CMFCVisualManager::GetTabFrameColors is used. And some other manager functions like OnEraseTabsFrame and OnEraseTabsArea.
So derive your own visual manager from the one you prefer. Overwrite the specific functions and so you can change the colors and behavior.
There is no other way. Just lok into the source code in void CMFCTabCtrl::OnDraw(CDC* pDC)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\src\mfc\afxtabctrl.cpp

Resources