User Tools

Site Tools


emacs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
emacs [2009/05/26 16:12] memeruizemacs [2021/02/01 05:55] (current) – external edit 127.0.0.1
Line 23: Line 23:
   * For autocompletition during edition, follow the instructions from [[http://www.enigmacurry.com/2009/01/21/autocompleteel-python-code-completion-in-emacs/]]. As May-2009 you need to get the development versions of rope, ropemacs, ropemode. For installing this packages you need easy_install, you can get this application by installing python-setuptools debian package. You need to find AutoComplete.el version 0.1.0, 0.2.0 doesn't work yet with the rest. The other dependencies you can get from debian unstable. Using this is simple, just press TAB when you need to autocomplete something, this is really cool, specially because it runs in console mode.   * For autocompletition during edition, follow the instructions from [[http://www.enigmacurry.com/2009/01/21/autocompleteel-python-code-completion-in-emacs/]]. As May-2009 you need to get the development versions of rope, ropemacs, ropemode. For installing this packages you need easy_install, you can get this application by installing python-setuptools debian package. You need to find AutoComplete.el version 0.1.0, 0.2.0 doesn't work yet with the rest. The other dependencies you can get from debian unstable. Using this is simple, just press TAB when you need to autocomplete something, this is really cool, specially because it runs in console mode.
   * If you install rope stuff then getting the python documentation should work. For getting the rope commands help press C-c d .   * If you install rope stuff then getting the python documentation should work. For getting the rope commands help press C-c d .
 +
 +===== Adding a directory to the emacs load path =====
 +
 +Add the following lines to your .emacs file
 +
 +  (setq load-path                                                               
 +      (append (list nil "~/.emacs.d/emacs"                                  
 +              load-path))                  
 +
 +===== Emacs and python, a better way =====
 +
 +The former method is nice but makes the tab key to interfere with the normal operation of the tab key. Using the following method, emacs and python work better together.
 +
 +[[http://www.rwdev.eu/articles/emacspyeng]]
 +
 +  - Install Pymacs
 +  - Copy files python-mode.el and pycomplete.el on your Emacs load_path (e.g. ~/.emacs.d/emacs).
 +  - Copy file pycomplete.py on your PYTHONPATH (e.g. /usr/lib/python2.5/site-packages)
 +  - Copy the following settings to your .emacs file
 +
 +  (require 'pycomplete)
 +  (setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
 +  (autoload 'python-mode "python-mode" "Python editing mode." t)
 +  (autoload 'pymacs-load "pymacs" nil t)
 +  (autoload 'pymacs-eval "pymacs" nil t)
 +  (autoload 'pymacs-apply "pymacs")
 +  (autoload 'pymacs-call "pymacs")
 +  (setq interpreter-mode-alist(cons '("python" . python-mode)
 +                             interpreter-mode-alist))
 +
  
 ===== Keybindings emacs command list ===== ===== Keybindings emacs command list =====
Line 31: Line 61:
 C-x C-s - Save changes\\ C-x C-s - Save changes\\
 C-g - Quits what you are doing\\ C-g - Quits what you are doing\\
-C-l - Recenters+C-l - Recenters\\ 
 +C-u cmd -  Repeats the command u times \\
  
 ==== Editing ==== ==== Editing ====
  
 C-k - Delete rest of line\\ C-k - Delete rest of line\\
-C-e - End of line\\ +C-e - Move to End of line\\ 
-C-a - Line start\\+C-a - move to Line start\\
 ESC C-\  indent-region\\ ESC C-\  indent-region\\
 C-o - insert-line\\ C-o - insert-line\\
 +C-d - delete current character\\
 +M-x - query-replace\\
  
 ==== Macro stuff ==== ==== Macro stuff ====
Line 59: Line 92:
 C-x ^ - enlarge-window\\ C-x ^ - enlarge-window\\
  
 +[[http://www.emacswiki.org/emacs/WindowResize]]
  
 ==== Python specific ==== ==== Python specific ====
Line 78: Line 111:
 C-x r s - Saves the marked region to a register\\ C-x r s - Saves the marked region to a register\\
 C-g - To deactivate the mark\\ C-g - To deactivate the mark\\
 +==== Spelling ====
 +
 +M-x ispell-change-dictionary\\
 +M-x ispell\\
 +
  
 External links with more commands are:\\ External links with more commands are:\\
emacs.1243354339.txt.gz · Last modified: 2021/02/01 05:55 (external edit)