Is there a way to do multiline editing a-la Visual Studio in Sublime? - visual-studio

Visual Studio allows selecting a vertical piece of text, and then editing it. One has to hold Shift + Alt and move the cursor up-down left-right to make the selection.
I know there is Ctrl + D multi-cursor thing in Sublime, but it's not quite the same.
So is there a way to do the multi-line editing a-la Visual Studio in Sublime?

Move cursor where you want, hold ctrl + shift press ↓ a few times.
Press tab, then ← twice, type "Hello World,",
Press esc to leave multi-line mode.

You also can perform "square selection" using your mouse middle button.

Answer: Standard way: Ctrl + Alt + Cursor (which flips the screen orientation on my laptop). The way that works: Keyboard Column Selection for Sublime Text 2 on Windows

Related

Does Visual Studio have a begin selection/set mark command like Emacs?

In Emacs, one can begin a selection (more accurately "set the mark") by pressing Ctrl-Space. Then, one can navigate around the file, e.g. by pressing End to go to the end of the current line, and the selection will follow the caret.
There is more to the Emacs mark than that, but my question is:
Does Visual Studio 2013 have a way to begin a selection at the caret and have the selection follow the caret until ESC is pressed, or something similar? Visual Studio has a command called "Edit.EmacsSetMark", but it does not seem to work for me.
I only know of SHIFT + cursor keys (including PgUp/PgDn, Home/End, and most of them also with Ctrl). Could take a bit of practice in your case, but very convenient IMO. The selection is cleared as soon as you use a cursor key with SHIFT released.
Even rectangular selections are supported if you also press ALT.
Then there is also the mouse of course. With variations by using SHIFT (extend selection) and ALT (rectangular).
Not that I know of for 2013, but you could do it in 2010 with this...a link

Keyboard Shortcuts in Visual Studio for faster coding

Visual Studio autocompletes brackets and tags and then shifts the cursor inside a bracket/tag upon creation.
I usually have to hit END then ENTER to continue past the tag, it would be really useful to 'jump' over the closing tag/bracket and possibly to the next line.
Is there a fundamental keyboard shortcut I'm missing here in order to accomplish this?
Can't find this in the MSDN VS Keyboard Shortcut manual either.
The keyboard shortcut you are looking for is Ctrl + Shift + Enter.
Pressing this will take you to the next line instead of inserting an enter, allowing you to move the cursor outside of the tag.

Visual Studio 2013 resize window shortcut hotkey

Is there any way to make a hotkey to resize the width of the current editor window in VS2013?
I do pretty much everything entirely through hotkeys EXCEPT resizing my windows. Most often I have 2 or 3 editors open in the same window vertically so each one is relatively narrow. Switching between the windows is easy with Ctrl + Tab but I really wish I could press a hotkey with left/right arrows to increase/decrease width of the current editor.
EDIT: Or at least go full screen into the current window temporarily. This is not the same as going full screen normally with Shift + Alt + Enter since that full screens all 3 windows still seperated.
Any way to do this?
Perhaps not quite what you want but VS has a shortcut for "Window.Float".
Options > Keyboard > Window.Float
Assign a shortcut for it (I've assigned Ctrl + W, Down Arrow)
When you float the window, you can snap it using the Windows shortcut of WinKey + Arrows.
WinKey + Left snaps the window to the next left-available position.
WinKey + Right snaps the window to the next right-available position.
WinKey + Up maximises.
WinKey + Down minimises.
Another option is to keep the tool windows "Solution exp, Team exp, .." as hidden,
and then using their shortcuts to show them again. When you are done press "Alt + _" for the alt-space menu.
For example, using the default settings, I have solution explorer hidden.
My use flow is:
Ctrl+p ctrl+p [Show the solution explorer window]
Use the keyboard to navigate or skip #1 and press "Ctrl+;" to search
When I'm done, press "esc" to hide it
or for windows where I want it to stay open: "Alt+_" then press "k" for dock

How can I block select in Geany?

I often need to select a block of text, like a leading character that occurs on many lines. LibreOffice has block selection. How can I do this in Geany?
For example, I want to remove the pipe and the space at the beginning of each line:
| Create another 'Login Role' for the 'auth' user:
| Role name: auth
| Password: auth
| Role privileges: Create database objects
It's called "column mode editing". Look here:
http://www.geany.org/manual/current/index.html#column-mode-editing-rectangular-selections
Column mode editing (rectangular selections)
There is basic support for column mode editing. To use it, create a
rectangular selection by holding down the Control and Shift keys (or
Alt and Shift on Windows) while selecting some text. Once a
rectangular selection exists you can start editing the text within
this selection and the modifications will be done for every line in
the selection.
It is also possible to create a zero-column selection - this is useful
to insert text on multiple lines.
Peter Mortensen has documented how to configure this on Lubuntu (for LXQt):
https://pmortensen.eu/world2/2020/03/29/using-geany/#Column_mode_blues
On Lubuntu, the keyboard shortcuts for selecting a rectangular area of
text (“column mode” in UltraEdit) do not work, because they conflict
with four default keyboard shortcuts in the window manager (LXDE?
Openbox?), Shift + Alt + arrow up, Shift + Alt + arrow down,
Shift + Alt + arrow left, and Shift + Alt + arrow right.
Disable the window manager keyboard shortcuts by editing file
~/.config/openbox/lubuntu-rc.xml near “S-A-Up”, “S-A-Down”,
“S-A-Left”, and “S-A-Right”. For example, change “S-A-Up” to
“S-A-Up99”, “S-A-Down” to “S-A-Down99”, “S-A-Left” to “S-A-Left99”,
and “S-A-Right” to “S-A-Right99”, respectively. And add an XML comment
as to why and document the original values (so they can more easily be
reverted). Edit and update (without a restart required):
vi ~/.config/openbox/lubuntu-rc.xml
openbox --reconfigure
It was tested with Lubuntu 18.04 (32 bit).
In Debian the following works for me: press only the Ctrl key and select by the mouse (not both Ctrl and Shift keys, as described in the manual).
In Ubuntu MATE (Geany 1.25) I can use Shift + Alt and then mark the text using arrow keys.
I think, Ctrl + Shift + mouse(!). It's working correct on Ubuntu with Geany 1.23.1. Please use the mouse, not the arrow keys.
Ctrl + Shift + Mouse on CentOS 7.3.
For me the key shortcuts are different. After installing the Extra Selection Geany plugin, I can use:
Alt + Shift + C (and then use the up, down, etc. arrow keys to move the cursor; edit the text; and then repeat Alt + Shift + C to go back to 'normal' edit mode).
More information is here.
(I use VirtualBox with Xubuntu 16.04.4 LTS (Windows 10 host).)

"Right Click" keyboard short cut for Visual Studio?

I'm trying to force myself to use as little mouse as possible and I can't find the answer to this simple short-cut anywhere! Here the the steps:
Open up Visual Studio. Open any C# file (or any code file I believe)
Point your mouse anywhere on the
window/file.
Right Click
Is there a shortcut key for this so I don't have to move my hand to the mouse?
Taken from lytebyte, you've got two options:
Shift + F10
That nutty key on the bottom-right of a modern Windows keyboard, the Menu key
Depends on where/why you're right-clicking.
The context-menu key is on the right of the keyboard nowadays, usually between the Windows key and the Control key on the right of your spacebar. That will open the context menu wherever the current focus is (usually in the text editor).
If you're using the right mouse button just to open the refactoring tools, you can use Ctrl + . (control period) to pop open the "smart tag" on any identifier. That'll get you the "generate method stub" menu item and the like.
To open a new file without keyboard you can use
CTRL + SHIFT + N (Using Resharper)
To show up the right click menu for any part of your code. Point to the part that you want and use
SHIFT + F10
Normally, I like using
CTRL + SHIFT + G (Resharper again)
for getting the Navigation menu (Usage, Base, Implementation, etc)
Even better if you want to go to any Method/class/intenal/or a field, use CTRL + SHIFT + ALT + N (Again using Resharper), this will bring you a list of all that match your criteria to choose from.
Does your keyboard have the extra 'Windows' keys, ie. the Windows logo (Start key) and the one on the right-hand side of the spacebar that looks like a menu? Cause that button on the right-hand side is the 'Context menu key'.
See the key between the right-hand side 'Windows' key and the Ctrl key?
Windows Keyboard layout
If your keyboard is less than 10 years old you should have these keys, unless you have an IBM laptop or a Mac.!
Assuming you just want a key you can press to right click, most\many keyboards have a key between alt and ctrl that right clicks.

Resources