-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add. Code snippet plugin #92
base: master
Are you sure you want to change the base?
Conversation
Small fixes
Add. Tests for config class
Fix. Clean up on finish command
Change. Each manager object has its own config object.
Thank you for the patches!
I'm thinking about adding the plugin folder to the search path right before loading the plugin itself; I can also add a check to see if the folder is present. Would this help? Or, I can add "packages" folder itself to the path, so if you're loading package files as
There is All those commands that are available from the IDE are in |
I think it will be better (just make sure it is last path and package can not redefice some
|
Change. Use WordStartPosition to detect last word
I just add a new local HotKeys = package_require 'snippets.hot_keys'
local Package = {}
Package.onRegister = function(package)
HotKeys:add(package, { 'Ctrl-M'}, function() ide:Print('Regular action') end)
HotKeys:add(package, {'Ctrl-K', 'Ctrl-M'}, function() ide:Print('Chained action') end)
end
Package.onUnRegister = function(package)
HotKeys:close_package(package) -- remove only shortcuts for this package
end
return Package I working on plugin that implement multi selection facility from the Sublime text editor. And there exists shortcut PS Is there any way to add text to status bar? I want to add there current hotkey chain. |
Replace `ReplaceSelection` to `DeleteRrange/InsertText` because of bug.
This plugin based on scite-tools/snippets plugin.
I did not use code snippets yet so I have no experience with it and may be some thing need change. So I really hope to any feedback. I tested this code only under Windows. I have plan to do this on Ubuntu as well, but may be only on a next week.
Possible improvements
cd
on Windows). I am not sure I need it so for now I have plan to leave it as is.Also, I think about add
package_require
function to ZBS source code. Its really ugly right now, but I really do not put all code in the one file.Update
I think I done with this package for now. I test it on Ubuntu and on Windows.