Closed Coteh closed 7 years ago
Nice job, overall the code looks good to me.
I have one minor ask for you to comment the code of insertContent(content)
function, especially the fact of ignoring the indentation setting, setting and restoring the auto_indent
param.
Just left my comments onto the function. Wanted to stress the point that calling settings() on the View object will return the settings local to that view, as per the docs:
"Returns a reference to the view's settings object. Any changes to this settings object will be private to this view."
With that being said, when we made the change to the "auto_indent" setting, it was only for that particular command being called then the original setting is restored in-place.
Using settings local to current view is an elegant solution. Great job and thank you for this pull request!
Fixes #126
As described in issue #126, added the ability to insert saved queries directly into existing tab at the current selection(s). Try it out and let me know what you think. I'll update the website once the green light is given.
This new feature expands the
st_list_queries
command to take a new argument for mode: "insert" which will perform the insertion of a selected saved query. The keybind for this feature is currently mapped toCtrl+E, Ctrl+I
.