Merge lp://staging/~julien-spautz/scratch/comment-plugin into lp://staging/~elementary-apps/scratch/scratch
Status: | Work in progress | ||||
---|---|---|---|---|---|
Proposed branch: | lp://staging/~julien-spautz/scratch/comment-plugin | ||||
Merge into: | lp://staging/~elementary-apps/scratch/scratch | ||||
Diff against target: |
368 lines (+281/-5) 8 files modified
CMakeLists.txt (+1/-1) plugins/CMakeLists.txt (+1/-0) plugins/comment/CMakeLists.txt (+24/-0) plugins/comment/CommentPlugin.vala (+65/-0) plugins/comment/Commentator.vala (+175/-0) plugins/comment/comment.plugin (+10/-0) plugins/vim-emulation/vim-emulation.vala (+1/-1) src/Widgets/SourceView.vala (+4/-3) |
||||
To merge this branch: | bzr merge lp://staging/~julien-spautz/scratch/comment-plugin | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mario Guerriero (community) | Needs Fixing | ||
Review via email: mp+216878@code.staging.launchpad.net |
Description of the change
Implemented a comment/uncomment shortcut as plugin. Not sure what shortcut to use so I'm using Ctrl M and Ctrl Shift M for commenting and uncommenting respectively which I've used in some other editor, don't know which one.
The plugin gets the comment tokens for the current language from gtk.sourceview. It will either comment the current line or the selected text. If only block or only line comments are supported, they are used as a substitute for the other. Un commenting simply removes all comment tokens in the current line or selection, doesn't watch for strings or other exceptions yet.
Unmerged revisions
- 1289. By Julien Spautz
-
watch for language changes
- 1288. By Julien Spautz
-
undo deleted line
- 1287. By Julien Spautz
-
implemented uncommenting
- 1286. By Julien Spautz
-
implemented keyboard shortcut for commenting lines or blocks, uncommenting not yet supported
Undoing is also kind of fucked up, no idea why.