Search Results

Search found 12252 results on 491 pages for 'emacs info'.

Page 16/491 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Vim or Emacs for software development

    - by Justin
    I'm not trying to start any wars here, just get some good info. I'm getting a little exhausted using numerous IDE's for development (VS, XCode, Eclipse/Netbeans, and TextMate) and am looking for a replacement I can use on all the different machines I interact with. What are some of the pros of Vim/Emacs for things like Languages supported Syntax highlighting (for things such as c, objc-c, c#, java, python, haskell, html, javascript, xml etc...) Code completion Code folding Working with a directory of files (like have a solution/project opened) Possible debugger support What are some of the main things you like about (Emacs/Vim, and please no flames only what you really like) Thanks =) *(yes.. I have scoured the net reading this vs that etc. but I'd like more of a 'why you love it' vs 'this is better than that because...')

    Read the article

  • C++ code beautifier for emacs/linux

    - by aaa
    hi I am looking for code beautifier for UNIX/emacs. I have looked at gnu indent, artistic style, however I need something a bit different. For example, I would like the following: for( int x= 0;; ++ x) if(x) break; to be formatted as for (int x = 0; ; ++x) if (x) break;. As far as I can tell artistic style does not do that (correct me if I am wrong). What can you recommend? Thanks edit both, artistic style and indent remove whitespace. Here is a small interactive command to beautify region: 405 (defun my-emacs-command-beautify-region() 406 (interactive) 407 (let ((cmd "astyle")) 408 (shell-command-on-region (region-beginning) (region-end) cmd (current-buffer) t))

    Read the article

  • Assign multiple Emacs keybindings to a single command?

    - by Dan
    I'm giving ErgoEmacs mode a try to see if I can use Emacs more comfortably. Some of its keybindings are fairly intuitive, but in many cases I don't want to outright replace the defaults. For example, in the context of ErgoEmacs' navigation shortcut structure, M-h makes sense as a replacement for C-a--but I want to be able to use both, not just M-h. I tried simply duplicating the commands: ;; Move to beginning/ending of line (defconst ergoemacs-move-beginning-of-line-key (kbd "C-a")) ; original (defconst ergoemacs-move-end-of-line-key (kbd "C-e")) ; original (defconst ergoemacs-move-beginning-of-line-key (kbd "M-h")) ; ergoemacs (defconst ergoemacs-move-end-of-line-key (kbd "M-H")) ; ergoemacs But Emacs simply overwrites the first keybinding with the second. What's the best way to address this?

    Read the article

  • How can one-handed work in Emacs be eased?

    - by N.N.
    My right hand is temporarily immobilized and I would like to do some minor work in Emacs, mostly in Org-mode, but also in AUCTeX. Are there ways to ease one-handed work in Emacs, such as some mode or particular work flow? For instance I noticed that for undoing it is easier to press C-x u than C-_ and that it is easier to mark text with methods involving C-Space than with combinations of S- and movement commands. I have found http://stackoverflow.com/questions/2391805/how-can-i-remain-productive-with-one-hand-completely-immobilized but that is not exactly what I am asking for. I want to ease whatever little time spent one-handed in Emacs (not in general) and this is also interesting for situations where there is no injury involved, such as when one hand is occupied. I do realize that I should avoid unnecessary strain. I am using GNU Emacs 23.3.1 in Ubuntu 11.04.

    Read the article

  • Open a file with su/sudo inside Emacs

    - by Chris Conway
    Suppose I want to open a file in an existing Emacs session using su or sudo, without dropping down to a shell and doing sudoedit or sudo emacs. One way to do this is (require 'tramp) C-c C-f /sudo::/path/to/file but this requires an expensive round-trip through SSH. Is there a more direct way? [EDIT] @JBB is right. I want to be able to invoke su/sudo to save as well as open. It would be OK (but not ideal) to re-authorize when saving. What I'm looking for is variations of find-file and save-buffer that can be "piped" through su/sudo.

    Read the article

  • How do you run the previous command in emacs shell?

    - by Lidmith
    I am in terminal mode on Ubuntu, and I'm running emacs with 2 buffers open, one is a ruby file, and the other is a shell (opened by typing M-x shell ), and when I switch to the shell buffer, I want to run the same command that I ran before. I would normally just hit the up arrow in a terminal window, but in emacs, it simply puts the cursor up one line. Does anyone know of keystroke to run the previous shell command from within an emacs shell?

    Read the article

  • Auto-focus xdvi after running viewdvi in Emacs with AUCTeX.

    - by D Connors
    I've been using emacs with AUCTeX mode to edit my latex documents for a few days now, but there's something that's really bugging me. As it should be, whenever I do C-c C-c RET it compiles the file, and if repeat the command it views the output in xdvi. It's also set to the mini-mode TeX-source-specials-mode, so instead of opening a new window in xdvi it only reloads the window that's already open, brings it to the front, and sends me to wherever the pointer was in emacs (forward search). Now here's the problem: Even though the xdvi window is brought to the front, it's not focused. Instead, the emacs windows stays with focus (and that's where any keyboard input goes). And I keep forgetting about that, which leads me to accidentally editing the source file while trying to navigate in xdvi. Not to mention I'm forced to alt-tab in order to focus xdvi, and alt-tab twice if I just want to get back to emacs. Is there a way around this problem? I just want xdvi to be focused whenever I run the view command from emacs.

    Read the article

  • Best keyboards for emacs?

    - by catphive
    For emacs users out there, what are your recommended keyboards? Bonus points for keyboards that: Have no capslock key. Instead, a control key in that position. Alt keys that are closer to the center, and easier to use with meta key combos. I find alt keys too far to the left to be a bit awkward to hit with my thumb in some key combos. Help ergonomically with emacs in other ways. I'm not a huge fan of model M style high and clacky keys. I instead prefer laptop style flat keys; however, I'm not disqualifying either category.

    Read the article

  • Emacs: print key binding for a command or list all key bindings

    - by Yktula
    In Emacs (GNU 23.2, *nix), how can I: list the key sequences bound to a particular command? For example, how can we list all the key sequences that execute save-buffers-kill-emacs, with the output of key sequences bound to it? Assuming we can do this, listing the key sequences bound to goto-line should print the output: M-g g on a default install. list all key-bindings? Does C-h b do this? Would it print my own bindings? I am aware that executing the command directly can print a key sequence it can be activated with, but it doesn't always do so, and a few things happen, including: (1) the output doesn't remain for long, (2) the command is executed. I want a command that lists for me (preferably all) the bindings attached to a given command, without executing the command, or something like that.

    Read the article

  • How do I resize my emacs22 window?

    - by Evan
    I tried searching for answers but can't find any. I'm running Ubuntu 10.04 LTS and have emacs22 installed: ii emacs22 22.2-0ubuntu9 The GNU Emacs editor (Emacs 22) ii emacs22-bin-common 22.2-0ubuntu9 The GNU Emacs editor's shared, architecture dependent file ii emacs22-common 22.2-0ubuntu9 The GNU Emacs editor's common infrastructure ii emacsen-common 1.4.19ubuntu1 Common facilities for all emacsen I find that I cannot resize the outer frame (X window) of the emacs session. When I move the mouse to the corner of the window, it doesn't change into the resize icon.... help!

    Read the article

  • In Lisp, Avoid "Cannot open load file" when using require

    - by Jesse
    I am working on a custom .emacs file that I will be able to use on several different computers. I would like to be able to load a mode if it exists on the system. If it does not exist I would like Emacs to stop showing the error: File error: Cannot open load file, X. For example: (require 'darkroom-mode) Results in: File error: Cannot open load file, darkroom-mode I am using file-exists-p to test if certain other files exist but for this test I would assume I need to search my load-path. I am new to Lisp so this is stumping me.

    Read the article

  • emacs indentation problem

    - by Gauthier
    I'm really trying to switch to emacs, but learning to setup the environment is a real pain. Everybody says it's worth it, so I just continue. I want my c code to be implemented that way: if(asdf) { asdr = 1; } Depending on the current standard (I know, don't get me started), could be: if(asdf) { asdr = 1; } I can't seem to change the indentation size from 2, it always looks like the GNU standard: if(asdf) { asdr = 1; } , which I dislike. Here is what I have put in my .emacs: ; Warn in C for while();, if(x=0), ... (global-cwarn-mode 1) ; no electric mode in c (c-toggle-electric-state -1) ; indent the current line only if the cursor is at the beginning of the line (setq-default c-tab-always-indent nil) (setq-default c-indent-level 4) (setq-default tab-width 4) (setq-default indent-tabs-mode nil) (setq-default c-basic-offset 4) (setq-default c-basic-indent 4) ; These commands I read about on the web, but they don't work? ;(highlight-tabs) ;(highlight-trailing_whitespace) This did not help, I have still the GNU indent. Anyone?

    Read the article

  • emacs -- keybind questions

    - by user565739
    I have successfully used Ctrl+Shift+Up ' Ctrl+Shift+down ' Ctrl+Shift+left' Ctrl+Shift+Right to different commands. But when I tried to use Ctrl+s to the command save-buffer and Ctrl+Shift+s, which is equivalent to Ctrl+S, to another command, it has some problem. save-buffer works fine, but when I type Ctrl+Shift+s, it excute the command save-buffer. I used Ctrl+q to find the control sequences of Ctrl+s and Ctrl+Shift+S, I get the same result, which is ^S. I expect that I will get ^s for Ctrl+s, but it doesn't. Anyone knows the reason? Another queston is: I use Ctrl+c for the command killing-ring-save. In this case, all commands (which are of large number) begin with Ctrl+c don't work now. Is there a way to replace the prefix Ctrl+c by another customized prefix? I may pose my question in the wrong direction. I use ctrl+c as killing-ring-save. It works fine in emacs (no mode). But if I open a .c file (C-mode), then when I type Ctrl+c, it waits me to type another key. I think in this case, ctrl+c is regarded as a prefix. In this case, I need the following modifications: Using a custom defined prefix, say Ctrl+a, as Ctrl+c ; Remove the prefix Ctrl+c ; Using Ctrl+c as killing-ring-save. I add the following to my ~/.emacs : (defun my-c-initialization-hook () (define-key c-mode-base-map (kbd "C-a") mode-specific-map) (define-key c-mode-base-map (kbd "C-c") 'kill-ring-save)) (add-hook 'c-initialization-hook 'my-c-initialization-hook) But this doesn't work. Ctrl+c is still regarded as a prefix, so I can't use it as kill-ring-save. Furthermore, if I type Ctrl+a Ctrl+c, it said it's not defined. (I thought it will have the same result as I type Ctrl+c Ctrl+c)

    Read the article

  • Highlighting correctly in an emacs major mode

    - by Paul Nathan
    Hi, I am developing an emacs major mode for a language (aka mydsl). However, using the techniques on xahlee's site doesn't seem to be working for some reason (possibly older emacs dialect..) The key issues I am fighting with are (1) highlighting comments is not working and (2), the use of regexp-opt lines is not working. I've reviewed the GNU manual and looked over cc-mode and elisp mode... those are significantly more complicated than I need. ;;;Standard # to newline comment ;;;Eventually should also have %% to %% multiline block comments (defun mydsl-comment-dwim (arg) "comment or uncomment" (interactive "*P") (require 'newcomment) (let ((deactivate-mark nil) (comment-start "#") (comment-end "") comment-dwim arg))) (defvar mydsl-events '("reservedword1" "reservedword2")) (defvar mydsl-keywords '("other-keyword" "another-keyword")) ;;Highlight various elements (setq mydsl-hilite '( ; stuff between " ("\"\\.\\*\\?" . font-lock-string-face) ; : , ; { } => @ $ = are all special elements (":\\|,\\|;\\|{\\|}\\|=>\\|@\\|$\\|=" . font-lock-keyword-face) ( ,(regexp-opt mydsl-keywords 'words) . font-lock-builtin-face) ( ,(regexp-opt mydsl-events 'words) . font-lock-constant-face) )) (defvar mydsl-tab-width nil "Width of a tab for MYDSL mode") (define-derived-mode mydsl-mode fundamental-mode "MYDSL mode is a major mode for editing MYDSL files" ;Recommended by manual (kill-all-local-variables) (setq mode-name "MYDSL script") (setq font-lock-defaults '((mydsl-hilite))) (if (null mydsl-tab-width) (setq tab-width mydsl-tab-width) (setq tab-width default-tab-width) ) ;Comment definitions (define-key mydsl-mode-map [remap comment-dwim] 'mydsl-comment-dwim) (modify-syntax-entry ?# "< b" mydsl-mode-syntax-table) (modify-syntax-entry ?\n "> b" mydsl-mode-syntax-table) ;;A gnu-correct program will have some sort of hook call here. ) (provide 'mydsl-mode)

    Read the article

  • Problem writing a snippet containing Emacs Lisp code

    - by user388346
    Hi all, I've been trying to make use of a cool feature of YASnippet: write snippets containing embedded Emacs Lisp code. There is a snippet for rst-mode that surrounds the entered text with "=" that is as long as the text such as in ==== Text ==== Based on this snippet, I decided to slightly modify it (with Elisp) so that it comments out these three lines depending on the major mode you are in (I thought that such a snippet would be useful to organize the source code). So I wrote this: ${1:`(insert comment-start)`} ${2:$(make-string (string-width text) ?\-)} $1 ${2:Text} $1 ${2:$(make-string (string-width text) ?\-)} $0 This code works relatively well except for one problem: the indentation of these three lines gets mixed up, depending on the major mode I'm in (e.g., in emacs-lisp-mode, the second and the third lines move more to the right than the first line). I think the source of the problem might have something to do with what comes after the string ${1: on the first line. If I add a character, I have no problem (i.e., all three lines are correctly aligned at the end of the snippet expansion). If I add a single space after this string, the misalignment problem still continues though. So my question is: do you know of any way of rewriting this snippet so that this misalignment does not arise? Do you know what's the source of this behaviour? Cheers,

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >