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:
- put cursor want new code snippet at, activate dock toolbar: open docked dialog marked in yellow.
- double-click option
ifelseif
in snippets section of dock: insert code block marked in blue. - 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:
click snippet want modify/delete: shown @ right. active section (either snippets or surroundwith) highlighted dark red background:
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
you can insert snippets documents using keyboard shortcut ctrl+shift+enter:
- you can write directly snippet name , press keyboard shortcut, or
- you can invoke popup pressing keyboard shortcut, , pressing keyboard shortcut again replace snippet name snippet content.
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:
- 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
Post a Comment