Geany-indent multiple lines at the same time - geany

In Geany, is it possible to indent multiple lines at the same time using a keyboard shortcut (instead of typing every indent by hand)?

Maybe I did not understand the question correctly, but both the TAB key and the CTRL+i shortcut do exactly that when multiple lines are selected.
For unindenting multiple lines, you can use both the SHIFT+TAB and CTRL+u shortcuts.
Generally, (SHIFT+)TAB seems to work in 95% of all modern text editors. CTRL+i/u is more Geany-specific, but can easily be found in the Geany Settings (Settings -> Keybindings -> Format).

Related

Switch between two opened editors

I have two editors opened, one on the left and one on the right. How to switch between them? I tried Ctrl + 1/2/3 but doesn't work.
It works, using the 1, 2 keys above the letters (not the keypad). Events in the keyboard shortcuts panel are under workbench.action.focusFirstEditorGroup and so on.
You can also bind commands such as workbench.action.navigateRight and so on to move focus between panels.
Ctrl+Shift+P show all commands, search Preference: Open Keyboard Shortcuts and open it, then you can search the action or shortcuts.
for this problem,searchfocusFirstEditorgroup,you can see the shortcut,change as you like.then searchfoucusSecondEditorGroup and so on.

How to disable triple click in Visual Studio

Is there a way, either built-in or by third-party extension, to disable triple-click from selecting the entire line while in a text editor? Either my mouse is too sensitive, or I'm inadvertently doing it, but more often than not, clicking a word, then copy / pasting it results in pasting of the entire line -- not my intention and very annoying. Ideally, it could be disabled (aka any click more than 1 just selects the word the cursor is over)
As already stated in the comments the problem is most likely that the word highlighting color is so similar to the color of selected text. So seems like we sometimes deselect a word instead of selecting it. And without a selection Ctrl-C copies the whole line. I had the same issue with JetBrains WebStorm. In Visual Studio for me it was ReSharper.
Changing the color helps. Tools -> Options -> Environment -> Fonts and Colors -> "ReSharper Usage of element under cursor". I made that darker such that selected text is clearly distinguishable.

How to make xCode "act" as the most normal editors?

I wonder, why doesn't xCode "act" as a normal editor? For example, when I press Ctrl+X, I'd like the current line to be copied-cut. When I press Shift+Tab I'd like the current selection to be shifted to the left, etc. That's the stuff most editors do by default.
How to make it do that?
Take a look at Preferences -> Key Bindings. Here you get a list of actions and their keyboard shortcuts - and you can change those keyboard shortcuts!
It's quite amazing how many actions there are, including a great number of familiar Emacs actions such as mark and yank. Many of them have no corresponding menu item; many of them have no keyboard shortcut by default. Some of them may be the things you are looking for, and all you need to do is change the shortcut if you don't like it. It is very possible that you'll find at least some bindings that you can use to make Xcode behave in a more familiar way.

Is there a way to indent lines (not format them) in Visual Studio?

In Eclipse, there are two distinct features: one to format a selection, one to just indent the lines, see e.g. Difference between Ctrl+Shift+F and Ctrl+I in Eclipse. I found the format feature in Visual Studio but how can I actually just indent the lines? Is there some built-in command for that or possibly a 3rd party add-on?
Note: I have asked a couple of friend that use VS daily and they all tried to persuade me that I am looking for the format feature. No I'm not. I tried to live with it for a while and it is just a different feature. I am after the indent/reindent only.
EDIT: I am looking for a clever indent, sometimes called reindent, which is different to just pressing Tab or Shift+Tab (increase/decrease indent level). The indent feature in Eclipse behaves like this:
It places a beginning of current line at the right position, no matter where that line was starting before. So instead of thinking whether you need to increase or descrease the indent level (Tab or Shift+Tab), you just invoke the indent command and it will do the right thing.
Invoking the indent command on an empty line places the caret at the right position for the user to start typing.
It never influences any character beyond the first non-whitespace character.
If you just want to indent some lines, you can
Select them.
Press Tab.
To un-indent them, replace the second step to: Shift+Tab.
You can find more VS shortcuts here.
There are toolbar buttons for this, with wonderfully inconsistent labels (at least in the Visual Studio 2013 I'm using)...
In the "Text Editor" toolbar (in my default setup), I have to buttons whose tooltips are:
"Decrease Line Indent"
"Increase Line Indent"
In the "Customize" dialog, on the "Commands" tab (with "Toolbar" set to "Text Editor") they appear in the list as:
"Line Unindent"
"Line Indent"
And finally, if you press the "Add Command..." button (on the "Customize" dialog) to produce the "Add Command" dialog and select the "Edit" category, you'll see these two entries:
"Outdent"
"Indent"
As far as I can tell, these are all the same two commands, which should do what you want.
They also appear in the Edit -> Advanced menu, at the very bottom.
----- Edit -----
I believe you might be able to turn off all of the "formatting" actions except for indentation, so that when you use the "auto-format" command, only the indentation is "formatted" for you. (Of course this prevents you from ever using the rest of the formatting features without turning them on again, but if you don't use them, this might work!)

iTerm2 keyboard shortcut - split pane navigation

I have been a long time user of the standard Mac Terminal. Decided to experiment with iTerm2 after hearing good things about it from my colleagues.
One of the more useful features I am seeing on iTerm2 is its split panes (much like vim split buffers).
In vim, I can move between split buffers using Ctrl+W+arrowkeys. Is there a keyboard shortcut for iTerm2 to move between panes as well?
From the documentation:
Cmd] and Cmd[ navigates among split panes in order of use.
Cmd+opt+←/↑/→/↓ navigate similarly to vim's C-w hjkl.
⌘+⌥+←/↑/→/↓ will let you navigate split panes in the direction of the arrow, i.e. when using ⌘+D to split panes vertically, ⌘+⌥+← and ⌘+⌥+→ will let you switch between the panes.
there is configuration in the following way:
Preferences -> keys -> Navigation shortcuts
the 3rd option: shortcut to choose a split pane is "no shortcut" by default, we can choose one
cheers
I was using Terminator before, so I found it convenient to re-map Alt + arrow-key to switch between the panes. This can be done in Preferences -> Keys -> Key Mappings - press the '+' button to add a mapping. Also, in my case such a mapping was already defined in Profiles, I simply removed it.
Spanish ISO:
⌘+⌥+[ goes left top
⌘+⌥+] goes bottom right

Resources