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 ...


19

My recommendation would be the awesome free app TextWrangler from Bare Bones Software


16

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 ...


12

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 ...


8

System Preferences > General > Show scroll bars > When scrolling


8

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

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.


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

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 ...


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 ...


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 ...


5

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 ...


5

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 ...


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: ...


5

KeyRemap4MacBook I knew I had seen this somewhere… All you need to do is install KeyRemap4Macbook. From the "implicit behavior" section: Share state of modifier keys with all connected keyboards: When you are using multiple keyboards, modifier keys are shared with all keyboards. For example, pressing "shift key on keyboard1" and "space key ...


4

In general, Mac applications that are expecting text input from the keyboard do not handle C-S combinations or C-digit combinations. Programs that work with control-shift combos (like anything running under X11) do so by handling key events as events, not character input. This is how they can differentiate between Tab and Ctrl-i, which both generate 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 ...


4

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):


4

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 ...


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 ...


3

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 ...


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

If you're wanting something free then you're best three would probably be Sublime Text 2, Text Wrangler and TextMate. They are also extremely good for coding, but certainly appropriate as simply a text editor.


3

I also recommend TextEdit because it'll be there, no installation needed. If you only need to modify an existing file, then giving it an .txt extension ensures that it opens in TextEdit in plain text mode, no surprises.


3

If you want to go with Terminal you can use nano which is a fairly simple text editor but usually enough to allow Joe Random to edit basic text files.


3

I have also had this problem for years! Just recently I tried out Emacs in OS X again. I finally fixed the problem by adding the following in my .emacs: (This is with Emacs 24.3) (when (eq system-type 'darwin) (setq mac-right-option-modifier 'none))


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 ...



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