I've been learning Markdown, and using the Python Markdown package, which often returns the following when I try to convert text that has been pasted in from the web:
UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c' in position 1611: ordinal not in range(128)
At the bottom of my editor I currently see this:
COMMAND MODE, Line X, Column Y
Is there a setting in Sublime Text 2 that will show the full position (as in 1611
in the example above) at all times so I can quickly find the bad character?
You have to add a folder to the Sublime Text window in order to navigate via the sidebar. Go to File -> Open Folder... and select the highest directory you want to be able to navigate. Also, 'View -> Sidebar -> Show Sidebar' if it still doesn't show.
The Goto Anything shortcuts navigate the current file. If you have a project open, you can press Ctrl ⇧ R to launch Goto Anything In Project. This command will search for symbols across every file in your project.
You could make a simple python script to do this.
1. Save this code to your User folder as characterCounter.py
(Preferences > Browse Packages > User
):
import sublime, sublime_plugin class PositionListener(sublime_plugin.EventListener): def on_selection_modified(self,view): text = "Position: " sels = view.sel() for s in sels: text += " " + str(s.begin()) if not s.empty(): text += "-" + str(s.end()) + " " view.set_status('exact_pos', text)
2. Then restart Sublime Text to have it loaded.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With