[OS X TeX] migrating from Emacs to TexShop

Herbert Schulz herbs at wideopenwest.com
Sat Feb 4 20:55:59 CET 2012


On Feb 4, 2012, at 1:17 PM, marian wrote:

> I have been an Emacs user for almost 20 years.  When I was young, I was a
> sophisticated one, and I would write Emacs Lisp code to get the editor to do
> exactly what I wanted.  Nowadays, I can't even be bothered to figure out how
> to configure Emacs so that its TeX-specific features work.
> 

Howdy,

In many ways its sounds like my history with emacs.

> For the last few days, I have been borrowing a friend's Mac.  I am impressed
> with it and thinking of buying one myself, and if I do, I am thinking of
> using TexShop, which I have been heavily using these past few days, instead
> of Emacs.  I was happily surprised to find that many of the standard Emacs
> keybindings using Control work in TexShop.  Unfortunately, none of the
> keybindings using Meta work, but I found a post in the MacOS-TeX archives
> explaining a way to make them work as well, and I plan to try it.
> 

I assume you're talking about creating the DefaultKeyBinding.dict file. You can get more information about and links to the web in the KeyBindings.zip file which you can get at <http://dl.dropbox.com/u/10932738/KeyBindings.zip>.

> A number of things, however, don't seem so convenient.  First, the first
> thing I noticed when I started editing a TeX file of mine using TeXShop is
> that there didn't seem to be any equivalent to Emacs's fill-paragraph
> command.  I concluded that the reason was probably that TeXShop expected you
> to keep each paragraph as a single line, so I converted my file to put each
> paragraph in a single line.  But I am not happy with this solution for two
> reasons.  First, it will make it hard to share files between the Mac and
> Unix.  Second, it makes the Emacs commands involving the beginning and end
> of line (C-a, C-e, C-k, etc.) behave very differently: going to the
> beginning of the line now takes you, in effect, to the beginning of the
> paragraph.  Second, as noted in the thread on getting the Meta-based
> commands to work, the PageUp and PageDown keys don't move the cursor as in
> Emacs (or at least the version of it I was using), and at least until I set
> up the hack to get the Meta-based bindings to work, C-v/M-v is not an
> alternative.
> Finally, there are lots of Emacs features that I rarely use but that are
> extremely useful once in a while, for instance the commands to manipulate
> rectangles.  As far as I understand, there would is just no TeXShop
> equivalent or workaround for any of them.  Do people resort to using another
> editor?  Using a scripting language?
> 

It is possible to put in hard-wrapped lines by selecting the paragraph, or even the whole document (Cmd-A) and then executing Source->Wrap Lines->Hard Wrap. Give that menu command a shortcut (Ctl-Cmd-H?) in System Preferences->Keyboard->Keyboard Shortcuts; take a look at the TeXshop Tips & Tricks document (Help->TeXShop Tips and Tricks) for an example of how to do this.

Not quite sure what you mean by ``manipulate rectangles.'' If you mean rectangular selection it can easily be done by holding the Opt key and click+drag the mouse pointer. I've found it very handy to extend and move items in tables.

The move to end/beginning of displayed line are done using Cmd-RightArrow/LeftArrow while selecting to end/beginning of displayed line just add the Shift key to the command. This is all standard Apple Text Framework behavior. Of course, once things are selected just Cmd-X to delete them and copy them to the paste board or Delete to just remove the selection.

> I am willing to learn new ways of working, and even to use the mouse on
> occasion, but they should be more or less as efficient as the old ones.  So
> far, I am impressed with the TeX-specific features of TeXShop and with the
> fact that it worked out-of-the-box, without the endless fiddling that seems
> necessary to get anything to work properly on Emacs.  But it also seems
> really inflexible and to lack not just some of the more esoteric features of
> Emacs, which I rarely use, but even some basic movement commands.  I want to
> just buy a Mac and use TeXShop and forget about all that complicated Unix
> stuff.  But these issues are holding me back, and I don't have a good sense
> of whether TeXShop is just very limited or whether there are alternatives
> and workarounds I don't know about yet.
> 
> Marian


Can't say Apple's Text Framework allows for many ways to extend things; as with the DefaultKeyBinding.dict file above.

What other things do you feel you need? Can't guarantee they can all be easily accomplished.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)






More information about the macostex-archives mailing list