Tag Info

Hot answers tagged

30

I would recommend using TextEdit since it is free and the default text editor on OS X. You only need to learn a key shortcut (Shift-Command-T) to convert the current file to plain text. Of course other GUI text editors exist on Mac platform but they need to be installed from the App Store or from Internet (see other answers for a selection of the most ...


12

Control-/ is not a part of the set of standard control codes. It is not directly representable as a keystroke in many terminal emulations. Such a keystroke is only properly detectable in certain platform-specific “scancode modes” or “GUI mode” (where the API tells you exactly which keys and modifiers are being used). Your terminal emulator is beeping because ...


10

I assume you're not using a trackpad, and/or your Show scroll bars preference in System Preferences → General is set to either Automatically based on input device or Always (otherwise, you shouldn't be seeing persistent scrollbars). Try changing this setting for Terminal only: defaults write com.apple.Terminal AppleShowScrollbars WhenScrolling


9

You can use a OSX GUI Emacs in the form of Aquamacs which is configured to be more OSX like it its key commands and menus and integrates with the OS. One appeal of emacs is because emacs is mainly written in the language (e-lisp) that users can use to extend it there are a lot of scripts that add all sorts of functionality to the editor making it nearly as ...


7

The default key bindings are stored in /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict. You can use plutil to convert the file to an XML format, like so: plutil -convert xml1 -o StandardKeyBinding.xml /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict Or, if you have Xcode or Property List Editor, ...


7

The second emacs came with OS X. For files that are logged in the package database, you can use pkgutil: $ pkgutil --file-info /usr/bin/emacs volume: / path: /usr/bin/emacs pkgid: com.apple.pkg.BSD pkg-version: 10.9.0.1.1.1306847324 install-time: 1382483268 uid: 0 gid: 0 mode: 555 A list of packages can be obtained via pkgutil --packages. However, note ...


6

IMO, if you have a UNIX background with previous experience with Emacs, it might make sense to "carry it forward" onto OS X. As a new text editor, I personally don't think it makes sense. Yes, it is a fully capable text editor and it can do everything, but as you've said, it does not integrate well into the OS, which for me is a major hurdle. I use vim on ...


6

By default, screen is not aware that it is running in a 256-color-capable xterm. To make programs in screen recognize this feature, you need to set a couple of things in your ~/.screenrc: term "screen-256color" # terminfo and termcap for nice 256 color terminal # allow bold colors - necessary for some reason attrcolor b ".I" # tell screen how to set ...


5

I just ran into what I think is the same problem when trying to use Ctrl-S under Vim in Terminal.app. I found a related tip indicating that by default, Terminal.app reserves Ctrl-S for old-fashioned XON/XOFF flow control. Adding this line to my .bash_profile -- or just entering it at the prompt -- freed up Ctrl-S and Ctrl-Q for use with Vim: stty -ixon ...


5

See the options under M-x customize-group ns There you can adjust the behavior of the modifier keys. I have set the right alt to "No modifier" - that's the same behavior as on PC keyboards with Alt-Gr. Another setting I like is to unset both alt keys and use the function key instead for alt.


5

These files starting with a dot are meant to be hidden in *nix. To see them in terminal add the -a flag to the ls command: ls -a To see them in the Finder you will want to set a hidden preference (this is global change tho, you'll see all your hidden files everywhere): defaults write com.apple.Finder AppleShowAllFiles TRUE and then restart the finder: ...


4

I don't know why, but I have figured it out that if I make the symlink to the Contents directory, then associations work fine. That is I do the following in a terminal window, using my personal Applications folder as an example: % mkdir ~/Applications/Emacs.app % ln -s /usr/local/Cellar/emacs/23.2/Emacs.app/Contents ~/Applications/Emacs.app Something ...


4

Terminal.app is actually doing what it's supposed to: shift-TAB sends ESC [ z which Emacs reads as M-[ z. The problem is that the terminal description for xterm-color (the one usually used with Terminal.app and other terminal emulators) is missing the kcbt declaration, so Emacs doesn't know that that's what the key sends. There are two ways to fix this: ...


4

Weird. I just installed emacs through brew and it automatically updated the "open with" dialog to include Emacs.app ; But you should be able to do the following: Directly after opening the "choose an application" dialog, press "/" to get a "go to folder" window. Enter the following path: /usr/local/Cellar/emacs/ and from there navigate to the Emacs.app ...


4

Unfortunately, there doesn't seem to be a way to get ESC-f to repeat and it has something to do with ESC. Here's one solution that will work: Currently, Terminal.app is using ESC as META. You can change this to ⌥ (option) like this. Visit Terminal -> Preferences ( ⌘-, ). Select the Keyboard Tab on the right Check the "Use option as meta key" box at the ...


4

The file /usr/bin/emacs is installed as part of Mac OS X. It is generally not a good idea to change or modify files that are installed as part of the default OS installation; other programs can rely on their presence. Utilities installed as part of the operating system can be invoked by other programs with the expectation that the version installed will ...


3

Answers to questions like this are likely to be subjective. I tend to disagree that Emacs.app does not integrate well in MacOS. I'm currently using regular Emacs.app from emacsformacosx.com (not Aquamacs) and a few lines in ~/.emacs can easily use familiar shortcuts, e.g. try (setq mac-option-modifier nil) (setq mac-right-option-modifier 'meta) (setq ...


3

Is it possible that you have a global shortcut associated to the key sequence Ctrl + S ? Such a shortcut would get the sequence before it is sent to the Terminal and it would explain why it doesn't work with Term.app and iTerm2.app. You can check for registered shortcuts in System Preferences, Keyboard, Keyboard shortcuts. You can also revert them to the ...


3

You can use alt/option and the cursor ← / → keys to move back and forth whole words at a time, taking you to either the beginning or end of the word depending on the direction you choose. Using shift also allows you to highlight text as you pass over it. Using the same combinations with ↑ / ↓ does the same within paragraphs.


3

There are XVim and xVim plugins for Xcode, they are made exactly for this. You can also use KeyRemap4MacBook for this (from answer on stackoverflow and this blog):


3

As of Mac OS X Lion 10.7, Terminal is more compatible with modern xterm† and therefore the default $TERM value is now xterm-256color, which contains the kcbt entry, eliminating any need to edit the terminfo entry. xterm-color describes an older branch of xterm and is missing a number of things supported by modern xterm. † Highlights include: Terminal now ...


3

Prompt is generally considered to be the best (or at least among the best) SSH clients for iOS. I've never used it specifically for emacs (as I don't use emacs) but I've never seen it send strange extra characters, even when sending control characters to, say, nano. Edit: Prompt version 1.3.2 now has a feature where you can use the Escape key as a Meta key. ...


3

Emacs mode hooks to the rescue! Taken from EmacsWiki: (defun mydired-sort () "Sort dired listings with directories first." (save-excursion (let (buffer-read-only) (forward-line 2) ;; beyond dir. header (sort-regexp-fields t "^.*$" "[ ]*." (point) (point-max))) (set-buffer-modified-p nil))) (defadvice dired-readin (after ...


2

Open a terminal window and type some of the text whose color you want to set the background the same as. Then open Terminal preferences. Click the Window tab and then the Background Color. This brings up a color picker window. Click the magnifying glass in the upper left and move it over the text you want to match the color with. When you click on the ...


2

You can make a Bundle with a Command that launches emacs. Or You can install the GITMate plugin, that adds Git badges and an Open With… menu in the drawer.


2

You could configure some of them in ~/Library/Keybindings/DefaultKeyBinding.dict. See hcs.harvard.edu/~jrus/Site/cocoa-text.html and this sample file: Emacs Opt Bindings.dict. Another option would be to use KeyRemap4MacBook. It supports over 1000 preconfigured keybindings, including an "Emacs Mode" section.


2

Some people I know always buy Macs with US keyboards for exactly this reason. I cursed at Emacs too (in Swedish, as well) and the only solution I've found is to use the US Extended layout, but using my Swedish keyboard. I spent several years with a US keyboard as my main keyboard so I can switch more or less without thinking. If you're not willing to go ...


2

Not really a proper answer, but there are some mac specific bindings in the Cocoa Emacs build that are useful. Emacs Cocoa Mac/OS X specific key bindings ⌘ + & kill-this-buffer ⌘ + ' next-multiframe-window ⌘ + , customize ⌘ + - center-line ⌘ + ; ispell-next ⌘ + shift + : ispell ⌘ + shift + ? info ...


2

Are you using a translucent terminal window appearance? Terminal now supports window background blur in addition to translucency, and existing settings profiles default to 20% blur (except Pro, which uses 0%). If you have a large terminal window and/or slower hardware, you may notice some slow down when moving around in emacs (compared to vim, emacs is ...


2

You cannot as the process is controlled by LaunchServices When an application e.g. Mail.app wants to open a document it launches (or relaunches) the application that reads it and sends information to the document by Apple Events as described in Open Operations thus the handlers have to recognise these Apple Events which are managed by the Cocoa or Carbon ...



Only top voted, non community-wiki answers of a minimum length are eligible