And there is another bug due to shlex stripping \ from paths on Windows… That will be an issue from the command line box only, because I forgot to include “commit (this file)” and friends in the latest release…
New Mercurial plugin for Sublime Text 2
Haha. I hadn’t realized the irony. But I actually push to both, now that hg-git’s sort fo working again with Mercurial 1.9.
Updated!
- Server is restarted if hg root isn’t a prefix of the current file’s path
The server should now always find the correct repository for the current file.
When I use this plugin, I can’t work out how to get the hg command line to persist. Every time I enter a command, it disappears. Unfortunately this makes the plugin unusable for me; it’s much more efficient to use an external command prompt.
For example, let’s say I want to run hg status. This is what happens:
-
I press Shift + Control + P
and select “SublimeHg: Open Hg Command Prompt” -
The command prompt opens in a new editor panel. (Yay!
) -
I type “status”
-
The command prompt panel disappears (Boo
!) and is replaced by a results panel (which shows the response from hg)
Now I want to run hg commit, perhaps followed by hg push. For each command, I have to start all over again. And when I’m debugging, this cycle repeats a lot.
Am I just being dense, or is this something that could be improved? It would be fantastic to get a persistent hg command prompt – one less window for me to manage.
Agreed, it’s very annoying. It used to be possible to reopen input panels on_done in ST1, but last time I tried in ST2 it wouldn’t work. I’ll be switching to Mercurial’s own python client for the command server soon, so I’ll take a look at this too. I suppose you know, but simple actions can be performed from the Command Palette too (Ctrl+Shift+P).
This version will attempt to restore the cmdline when you focus the view where you started it first:
bitbucket.org/guillermooo/subli … me-package
Make sure to ignore or overwrite SublimeHg to avoid conflicts.
It seems to work ok-ish here, but I’ve just whipped it up, so I dunno. If it holds together, I will apply the change in the next version.
Updated!
github.com/SublimeText/SublimeHg
- Persistent shell to the commad server
- Empty output is ignored instead of printed to output buffer
Updated!
github.com/SublimeText/SublimeHg
- Tab completion for top-level commands in the command line
- Command history (!h and !mkh)
Updated!
- All commands run in the background
- Highlighting for status, log reports, etc.
Issues
- Mercurial server works only off the current dir Sublime Text was started from
Updated!
- should run regardless of how Sublime Text is started
- cmdline will be restored every time a SublimeHg - Output buffer loses focus (and if you entered it from a cmdline)
Updated!
- Use buffer as CLI of sorts
- Use private server for each distinct repo
Hey there, I implemented my suggested feature and it works more or less. Maybe you can reuse/incorporate some of my code.
Updated!
- serve command will run in its own console
Remember that as of dev build 2180 you can set Sublime Text to your editor in .hgrc to handle commit messages.
- windows: sublime_text.exe --wait
- other: sublime_text -w
This seems to work all right for me on Windows 7 and Linux Mint.
It does if you add this to your User Settings:
[code] “packages.sublime_hg.extensions”:
"mq"
],[/code]
[quote=“guillermooo”]It does if you add this to your User Settings:
[code] “packages.sublime_hg.extensions”:
"mq"
],[/code][/quote]
Okay, thank you. So as far as I understood, this plugin has more features than hg4subl. Am I right? As for the user settings, what happens if I specify such mercurial extensions as color or pager?