Notepad++ - make functions "clickable"? - windows

I just thought about this maybe being useful, but I can't find a way to do it.
Is there a way, in Notepad++, to make function names "clickable" -- ie make them links, so that if you click on them, it automatically takes you to its definition (ideally across an entire code-base)?

At the moment there's no plugin offering directly clickable function names.
But you could try the plugin SourceCookifier together with some N++ tweaking.
Open N++'s "contextMenu.xml" and add this line somewhere:
<Item PluginEntryName="SourceCookifier" PluginCommandItemName="Go To Definition"/>
At least a solution to have it with 2 mouse clicks > right click > contextmenu > "Go To Definition".
I would rather say simply press CTRL + SHIFT + RETURN when the cursor is on a symbol, which also executes
"Go To Definition", but since you asked for a mouse button approach..
/EDIT
There has been an update of the plug-in these days.
Here's a snippet from the changelog:
0.7.1
-new: option "Go to definition by pressing ctrl + left mousebutton"

Related

Can't collapse pieces of code after doing Ctrl + M, P

Ctrl + M, P expands the whole document. But after doing this I can't collapse back specific methods or pieces of code. It's not possible via shortcut keys (for example: Ctrl + M, M) neither via the menu:
As you can see, only Ctrl + M, O is possible which collapses the whole document
Also the + en - signs disappear when I do Ctrl + M, P
In VS2012 toggling outline expansion is [CTRL] + M, M. I presume this hasn't changed from previous version. Don't have VS2010 to check...
Old question, and some of this is in the comments, but I'll tie it all together in an official answer since I recently did the same thing accidentally in Visual Studio 2015 and it took me a while to figure out what I had done.
The CTRL+M, CTRL+P combination turns off outlining for the current document. It is possible to turn it back on by closing and re-opening the document as long as the "Enter outlining mode when files open" option is checked under Tools|Options|Text Editor|C#|Advanced. (there are similar options for other editor types - you can search on "outline" in the options dialog to see them all).
If you find yourself doing this often, there is a command to turn outlining back on, however, it is not assigned a keyboard shortcut by default. You can assign one though.
Open the Tools|Options|Environment|Keyboard dialog.
Enter "outli" under "Show commands containing" and look through the list below for the one named "Edit.StartAutomaticOutlining".
When you click on it, it will either show you what keys are currently assigned if a shortcut is already assigned, or will indicate nothing is assigned.
If there isn't anything listed, select "Editor" from "Use new shortcut in", then in the "Press shortcut keys" box, press the key combination you want to assign it to. For example, I used CTRL+M, CTRL+[.
Now if you accidentally hit CTRL-M, CTRL-P and turn off outlining, you can quickly re-enable outlining with CTRL-M, CTRL-[.

How to indent my code in codeblocks?

What are the best code blocks short cuts ? Also is there some way we can directly indent all our code ? In addition how can we move through the active tabs in codeblocks ?
Tips about tab identation are helpful when you write your code from begining. But if you paste code in CodeBlocks from some external source, like PDF document, that code often will not have good identation.
In this case, you need to select code, right click on it, and choose Format use AStyle option.
This is a plugin for CodeBlocks for right text formatting.
I hope this will help someone!
You (these are the default settings I believe) can select a block of code and press the Tab key. This will indent the entire block.
So for indenting a whole file: Ctrl + A, then Tab.
In addition, you can use Shift + Tab on a selected block to "unindent"
You can move through the open tabs with Ctrl + Shift + Tab.
As for the best shortcuts:
I like Ctrl + D to duplicate a line and
Ctrl + L to copy it.
Anyway, you can set whatever shortkeys you like in the Editor menu (there you will also be able to find all shortkey currently set).
]2
Add shortcut as you wish from Settings->Editor->Keyboard shortcuts->plugins->Source code formatters(Astyle) or use Plugins->Source code formatters(Astyle)
CTRL+A to select the code and TAB for alignment.
I have not had much luck with the code formatter in C::B. I like my code to look like this...
if (blah..) {
SomeCode();
} else {
DifferentCode();
}
it allows more code to fit on a screen, and is still reasonably readable.
After trying to tweak the settings in Settings->Editor, then Source Formatter tab, when I went to format my code, it removed the if line entirely, and I have not been able to unset my tweaks to make it work.
Fornatually, ctrl-z still works.
The code formatter should never remove code, only play with white space.
Maybe there is a better plugin.
Mark.
In addition in How to switch between tabs in codeblocks.
codebocks 20.03
Linux (KDE Neon)
To switch between tabs.
Activate this with CTRL+SHIFT+TAB, then you can use the know options:
CTRL+TAB , to switch to the right tab.
CTRL+SHIFT+TAB , to switch to the left tab.
Or this other option, but this is not in the keyboard shortcuts, this option doesn't work in a cycle mode, when your get the last right tab, it jump to the bottom tabs:
CTRL+ right-arrow-key , to switch to the right tab.
CTRL+ left-arrow-key , to switch to the left tab.
Remember to activate with CTRL+SHIFT+TAB.
After you land in the desire tab you can type TAB to begin to start writing code.

Keyboard shortcut for Visual Studio code editor Members and Types combos

I wonder what is the keyboard shortcut for these two combo boxs and specially the right part which list all the members of current class and is very handy for navigating a large class.
I tried to figure it out myself but I do not know the exact names to search for it.
That whole thing is called "Navigation bar" (Window.MovetoNavigationBar) and can be activated by default by pressing Ctrl + F2. There doesn't seem to be a shortcut for the right side of the navigation bar, so pressing the short cut key always takes you to the combo box on the left side. You can use Tab to jump between the combo boxes.
The keyboard shortcut is Ctrl + F2 which takes you to the left-hand combo. If you hover over each one in turn (at least in VS2k8) it shows you a tooltip which identifies the two combos as "Types" and "Members", respectively.
Pressing Tab will take you to the right-hand combo and Ctrl + ↓ will expand the combo for you.
Alternative Resharper approach #1
"Go to file member" which is "Alt+\" .
go to link for advanced features
Alternative Resharper approach #2
"Go to Next/Previous Member" with Alt+Down or Alt+Up
this one is very handy and my favorite :

Textmate tab and de-tab selected block

Recently switched to Textmate on Mac for coding. On PC when ever I want to tab in or out a block of code I just highlight and press tab or shift+tab to move it in our out. It's very useful when you are adding an extra loop or conditional statement to a block of code to keep everything tidy and neatly indented.
On Textmate however when I try this it just replaces my selected text with a tab. So is there a way to do tab and de-tab lines of code in textmate?
Indent: Alt+Tab
Un-Indent: Shift+Alt+Tab
the hotkey is command-left bracket to move left and command-right bracket to move right
(the buttons next to 'p')
heres a link to more hotkeys and such
http://projects.serenity.de/textmate/tutorials/basics/
You can use Shift+Tab to decrease indent; You just need to make and assign a macro. You can reuse this technique to accomplish a great many things.
Enter some text, and intend them, this is mostly for feedback.
Click the Record Macro Button
Use ⇧+⌥+⇥ (aka; Shift + Option + Tab) to decrease the indentation.
Click the record button to stop recording the macro.
Use the Edit menu or ⌃+⌘+M to save your macro;
Saving will prompt you to create a new bundle*, or add your macro to an existing bundle.
Add a Key Equivalent by clicking in the field and pressing ⇧+⇥
Your bundle-macro should look like the one below, simply Save and you're done! TextMate will now decrease indent on ⇧+⇥
*: (as noted by u/PatrickT) Sadly the create new bundle functionality has not yet been implemented, and you must choose to add to an existing bundle. You can still create a bundle via Bundles -> Edit Bundles then Command + N.
As an alternative, you can change the keybindings, see Link
Here is what I did:
Install Link
Go to File -> Open -> User Key Bindings, this will create/edit ~/Libary/KeyBindings/DefaultKeyBinding.dict
Add a binding, for the action enter shiftRight: (indent) manually (this is a TextMate specific action and not in the pre-populated actions list)
Choose a shortcut, I used cmd+alt+right
Do the same for the action shiftLeft: (un-indent, I used cmd+alt+left)
Save and then restart TextMate
I used a shortcut with arrow keys as my right hand is already on the arrow keys when I am selecting multiple lines, so this is a good fit.
The reason why I did it was because I have a german keyboard and alt+tab/alt+shift+tab don't work for me since I am using Witch for app-switching using these exact shortcuts.
EDIT: cmd+alt+left/right don't work when you have multiple tabs open, as they are used for navigate to next or previous tab in TextMate... seems this cannot be changed or overridden (I tried Setting Shortcut Keys in Textmate). Looking for an alternative shortcut now.

What is this "go forward/backward" thing? ........and file switching

You know in Xcode, you can press option - command - left/right arrows to switch between multiple files. But what are these files?
They seem to be the ones that have been opened. But is there any way to check what they are? And close some unwanted ones.
Or, any other way you know to switch between files??
alt text http://img19.imageshack.us/img19/8724/picture4asx.png
if you click on untitled.m it will bring up the 'history' although it really functions more like multiple open documents per window.
The 2 arrows to the left of it are equivalent to the command+option+arrow
command+shift+W will close the current open document and open the most recent
I dearly miss ctrl+tab for recent document list like in Visual Studio, Eclipse and others. They do it with the application switcher so why not in their editors ? And whats up with "Command + Option + Shift + T" shortcuts ? One thing I have noticed after switching to Mac is the use of lame shortcuts like that, "press cmd+ctrl+option+]+k to open bla bla". Have Apple developers 4 hands or something ? If I want to indent multiple lines it should have been just tab.
Apple and 3rd party developers doesn't seem to follow a standard like they do in the windows world, every app has its own way of doing things.
Your guess about
They seem to be the ones that have
been opened
is correct.
Here is some ways you can use to switch between files.
^1 popups loaded files
Command + Option + Up to switch between declaration and implementation files.
Command + Shift + D to quick open project related file.
Command + Option + Shift + T to reveal your file in the group list. And then select related one.
"Popup of include files" is also good one to browse files related to the current one.
"View -> Smart Groups -> All Files | Symbols | etc " and then Tab and type first letters. Tab. And choose one you want. Bind some keys for that.
Simpliest: Two finger swiping on the trackpad left-and-right.
Command + Option + left / right arrows - collapse code
Command + Ctrl + up / down arrows - switch between .h and .m
Command + Ctrl + left / right arrows - move backward / forward

Resources