Notepad++: Mark a word and insert command - command

How can I mark a word in notepad++ and can easily insert a command, with the marked word as argument? E.g.: I have a text with the word "WORD1", I want to mark "WORD1" with the mouse, and after press any button/shortcut, or quick contextmenu with the right mouse-button, or anything like that, and it will make it to "\command{WORD1}".
Of course, I want to specify "\command", e.g. I can choose the needed command in a dropdown of the context menu, or choose a specific button/shortcut for any command.
Is that possible?

Try recording a macro doing what you want and then assigning a keyboard shortcut to it and from then on, you should be able to get it to do what you want.
Look at the Shortcut Mapper
Finding location of NP++ Macros
Type %appdata% in run and hit Enter, when the directory opens, locate Notepad++ and you see shortcuts.xml

Related

How to remove the word "copy" when you copy & paste a file in VSCode

When copy a file ".env", I hope to got a duplicated file named ".env 1" not ".env copy"
You can change this behavior by setting the explorer.incrementalNaming to smart.
To do that, do the following:
cmd+,
search for: explorer.incrementalNaming
Change the setting to smart.
Otherwise, if you don't want to change the setting, you can just constantly change the filename after copy is complete. The fastest and most efficient way I found is through the following keyboard commands:
Select file in Explorer
ctrl+c (or cmd+c if you're on a mac)
ctrl+v (or cmd+v)
<enter>
right arrow once
backspace 5 times
then put in 1.

Netbeans surround selection with quotes

I want to surround the selected text with quotes or parentheses when I hit the corresponding button, not to overwrite it, which is the behavior I have observed. From what I have read so far, this is how the program usually behaves, but definitely not my case. I could not find the equivalent setting under Tools > Options. I have found the macros to surround a single word, but I want the whole selection, as would be expected in other text editors and IDEs.
Version: Apache NetBeans IDE 12.2
For example - the selection:
a string consisting of multiple words
Press Shift + 2 (where " is on my keyboard layout):
"a string consisting of multiple words"
OK....
You were right when you said that you could not find anything close this shortcut. I looked through the entire list and there was none. The only thing close to it was to surround a single word in quotes. So, that means that you will have to create one shortcut to surround text selection in quotes and another with parentheses. They will be very similar, but will require two different hotkeys.
For example, I created a shortcut to surround text selection in quotes. To do so, you have to go to Tools -> Options -> Editor and click New button
In the "New Macro Dialog" enter a name (i.e. "quote-selection") and click "OK". Then, type in copy-to-clipboard "\"" paste-from-clipboard "\"" in the "Macro Code" text area. Lastly, click "Set Shortcut..." button and type in the exact sequence of key presses you want to use for your shortcut. Don't worry if you enter a shortcut already in use. It will warn you if you do. I chose to use CNTL+ALT+3 because that's not in use. When you are satisfied, just click "OK" to record your shortcut. If you make a mistake in the key presses, simply click "Clear".
Then, repeat the process for surrounding with parentheses with the macro code copy-to-clipboard "(" paste-from-clipboard ")". When you are done, click "Apply" and "OK".
I used Netbeans version 12.3, so I expect everything shown here should be very similar (if not identical) to 12.2.

Emacs term mode: Selecting word by double-clicking with mouse

How do I get a url to be selected by double-clicking in Emacs term mode? For example, if I see stackoverflow.com in my terminal and I'd like to select it by double-clicking on it, it currently just selects either stackoverflow or com, but not stackoverflow.com
Double-click the dot (.) in stackoverflow.com to select all of that URL.
Depending on the current mode, . might have symbol syntax and not word syntax.
Double-clicking a word-constituent character selects the clicked word.
Double-clicking a symbol-constituent character selects the clicked symbol.
See the Elisp manual, node Syntax Class Table.
You can also click mouse-3 on the last word to select (e.g. com), after double-clicking mouse-1 on the first word to select (e.g. stackoverflow).
See the Emacs manual, node Mouse Commands.
You can double-click on one word and then, keeping the button pressed, move the mouse to extend the selection by additional words.

Eclipse - multiline comment with asterisks doesn't work

I'm not able to use ani shortcuts for using comments with asterisk. Every key combination doesn't work. I tried with CTRL+/, CTRL+SHIFT+/, CTRL+C; all of these have the same output, i.e. a simple comment with // on every line. Other shortcuts like CTRL+\, CTRL+SHIFT+\ or CTRL+SHIFT+F doesn't work at all.
So, how can I have this shortcut?
These are the Comments options
Open Window>Preferences>General>Keys>type "add block comment" in the search box, you should see:
the type "remove block comment"
These settings are by default, but if the shortcut is not working on your machine, you must be missing these bindings, To create them, you need to mark the command "Add Block Comment", then click inside the "Binding" field and press CTRL+SHIFT+/, then press Apply. The same is for uncommenting.
I have a similar problem to the one you have: the / shortcut seems to trigger a folding operation (at least in the Java editor) that does not appear in the keys preferences table.
Modifying the key in the keys preferences table seems to work fine: setting the binding to Shift+Ctrl+Q for the "Add Block Comment" command sets the expected block comment.
The reason is clear to me: the Shift+Ctrl+/ binding is very difficult to reproduce in a Linux environment because Eclipse makes a clear difference Numpad_Divide and the '/'. The Normal '/' strike is being modified by the shift key (French keyboard).

How do you switch between files when using prelude's projectile?

Imagine you have these files in your project:
a/b/first.png
a/first.png
If I trigger projectile with C-c p f and write first.png, and I write first.png , it will show me both files. Is there a way to select the next file?
Example:
In the image below, the first file in the list is .document. Without writing any other letter, is it possible to switch through the list provided by projectile? Is there a combination that will cycle through those file names, like , press some key combination and then .gitignore is selected?
If I correctly understand, the projectile uses the ido package for file name completions, and other things. The ido (and many other packages) uses the C-s to switch to next file name, and C-r to switch to previous file. See "Using IDO" section in previous link
The keyboard arrow keys will toggle through options as well, and you can then hit enter when the file you want is highlighted next to the text you typed.