I'm wondering how can I can navigate to a character location? I have a script that will tell me the character location number, no line number.
INFO: log-process/3093 on local-machine: Some Log Message
The 3093
is the character location number.
I do this by selecting code from the start of the file. Then, total number of selected characters is displayed in the bottom right corner, so I can find the character that I only knew the number of.
In WebStorm, if you mouse click on the file line and char count in the bottom bar:
it will open up a dialog where you can type in the line and char position:
I had the same situation today. I have a minifed and uglified javascript file, and I was simply searching manually for error (14, 4974). In the bottom right corner of Webstorm, you can see the line number and character position.
Searching for lets say line 14 and position 18438 is not an easy task, but clicking inside the script file may help you to pin point the location.
No such navigation action exists. You'll need to either 1) Search for a plug-in that will do this; 2) write your own plug-in to do it; or 3) Open a feature request to add such functionality.
The "Go to Line" dialog was enhanced to be "Go to Line:Column". You can open it by:
This will open the Go to Line:Column dialog:
In the dialog, you can enter a value such as 10:15
to go to the 15th character on line 10. You can also enter just a line, 10
which will take you to the start of that line (line 10 in this example). Or you can enter just a character position, for example :15
, which will take you to that character position on the current line.
However, I am still unaware of a way say "Navigate to the Nth character position in the file". And the original poster's feature for such a feature is still open.
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