Hello,
is it possible to insert a ctrl-L (new page) into the current buffer? And is it possible to make this visible? And can I even use some key to behave as 'go to the next/previous page'?
Patrick
On Mar 29, 2007, at 6:26 AM, Patrick Gundlach wrote:
is it possible to insert a ctrl-L (new page) into the current buffer?
If I understand what you're asking, this is the same question I had back in November.
http://thread.gmane.org/gmane.editors.textmate.general/15799
You can "type" such things in almost any Cocoa text input area, but not in TextMate's editor. A clunky way to do it would be to bring up the Find dialog in TextMate, type what you want, copy it, close the dialog, then paste the thing into the document.
For example, to insert your ⌃L:
⌘F ⌃Q ⌃L ⌘A ⌘C ⎋ ⌘V
Also be aware that if a file containing such characters it part of a project, TextMate might think it's a binary file.
My conclusion was that this is the one thing I still need vim for.
And is it possible to make this visible?
You can see that such characters are in a document using ⌥⌘I, but you won't be able to identify them. You'll just see a diamond.
And can I even use some key to behave as 'go to the next/previous page'?
You might be able to make a Macro that searches for a particular string.
--- Rob McBroom http://www.skurfer.com/ I didn't "switch" to Apple... my OS did.
Hello Rob,
is it possible to insert a ctrl-L (new page) into the current buffer?
If I understand what you're asking, this is the same question I had back in November.
Right.
My conclusion was that this is the one thing I still need vim for.
Or emacs in my case. Right. Sometimes I split my source files in pages and I can easily navigate from page to page. This is so handy in some cases and I really miss that feature. I don't really like to use bookmarks, they are textmate only and won't stay at the place (cmd-a, cmd-x, cmd-v messes them up).
Thanks for the (slightly disappointing) anwser. I still think that Textmate is a great texteditor!
Patrick
On Mar 29, 2007, at 4:44 PM, Patrick Gundlach wrote:
Sometimes I split my source files in pages and I can easily navigate from page to page. This is so handy in some cases and I really miss that feature. I don't really like to use bookmarks, they are textmate only and won't stay at the place (cmd-a, cmd-x, cmd-v messes them up).
Have you looked at the TODO Bundle? You could add your own tag like "PAGE" or "MARK" and when you run "Show TODO list", it will hyperlink any that it finds in your files (assuming you don't mind having such strings visible). It's not as quick as an immediate "jump to next", but you could probably create a command or macro that jumped to the next occurrence of your chosen string.
--- Rob McBroom http://www.skurfer.com/ I didn't "switch" to Apple... my OS did.
You can easily make it so that pressing ^L inserts a control-L character. Just create a snippet in the bundle editor, and type control-Q, control-L into the snippet definition. You won't be able to see it in the editor window, but if you typed it, it'll be there. Then set control-L as the shortcut key for that snippet. Voilà!
For going to the next ^L, you can just record a macro that does a search for it. Again, you can type control-Q, control-L into the search box.
The only problem is that, as Rob said, the only way you can see them in your document is to Show Invisibles.
Robin
On Mar 29, 2007, at 5:50 PM, Robin Houston wrote:
The only problem is that, as Rob said, the only way you can see them in your document is to Show Invisibles.
if it's really all that useful we could extend the syntaxes to scope a line with that character and then modify themes to handle it or you could make a style tmPreference.
thomas Aylott — subtleGradient — CrazyEgg — sixteenColors
Hi all,
I've got ^L to show up in my files and made a macro to search for it. Great so far. I currently have my own grammar extension to match ^L and assign it a 'scope'. Question: is there a 'global' grammar where I could put this in, so all source files would benefit?
Patrick
Thanks so far for you help!
On Mar 30, 2007, at 4:51 AM, Patrick Gundlach wrote:
Hi all,
I've got ^L to show up in my files and made a macro to search for it. Great so far. I currently have my own grammar extension to match ^L and assign it a 'scope'. Question: is there a 'global' grammar where I could put this in, so all source files would benefit?
For the scope issue, not yet, though I think 2.0 will sort of allow you something like this, perhaps.
I suppose in general we could have an empty "custom" grammar included in all other grammars, that would allow the user to add his own little additions like the one above. But there are complications that I'd rather not go into atm. 2.0 will have dynamic scopes though, if I remember correctly, which will I think give us some flexibility in this matter.
As far as the macro goes of course, there's no problem, you can have that work in any grammar.
Patrick
Thanks so far for you help!
Haris Skiadas Department of Mathematics and Computer Science Hanover College