Manage code snippets in Notepad++ -


is there way manage code snippets backup database , code highlighting in notepad++?

there plugin manage code snippets:

snippetplus
.net 3.5 required! code snippet , surround plugin notepad++. write snippet name , replace real code or select text , surround if,trycatch,table,div or whatever.will give hint if don't remember snippet name note latest version may shown, though have older version installed. reinstall ensure have latest version.
author: rajesh kumar
homepage: http://sourceforge.net/projects/snippetplus/

you can install notepad++ plugin manager, , activate dock clicking black m-like symbol in toolbar; select 1 of bundled snippets , paste editor double-clicking it.

for example, if have visual basic file , need include try/catch block contains if-elseif-else structure, must follow these steps indicated in image:

snippetplus example

  1. put cursor want new code snippet at, activate dock toolbar: open docked dialog marked in yellow.
  2. double-click option ifelseif in snippets section of dock: insert code block marked in blue.
  3. select code want inside try/catch block , double-click option trycatch in surroundwith section of dock: replace selected code code block marked in red.

if want modify existing snippets or include yours, use gui editor:
gui editor

click snippet want modify/delete: shown @ right. active section (either snippets or surroundwith) highlighted dark red background:

gui editor

you can add custom snippets too: select proper language , click snippet section want new snippet belong (either snippets or surroundwith), write name of new snippet want create (e.g. sample): button modify change add new
add new snippet

you can insert snippets documents using keyboard shortcut ctrl+shift+enter:

  1. you can write directly snippet name , press keyboard shortcut, or
  2. you can invoke popup pressing keyboard shortcut, , pressing keyboard shortcut again replace snippet name snippet content.

insert snippet keyboard shortcut

notes:

  • this plugin keeps snippets (including custom ones) between restarts.
  • if add/modify/delete snippets, after restart of notepad++ changes applied (including contents of lists @ sections snippets , surroundwith). careful not duplicate or add incomplete snippets.
  • to apply code highlighting language you're working, select menu language done traditionally:
    code highlight
  • the code snippets shown on ctrl+shift+enter menu, depend on language highlighting applied document. code snippets shown globally belonging category general.

i hope information helpful you.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -