28 September 2016, 21:52 | #1 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
|
[Cross-dev] Setting up emacs for amiga development
How about you setup your (linux) emacs to get autocompletion for amiga structures?
Take a look at the screenshot Follow this excellent guide Part 1: [ Show youtube player ] Part 2: [ Show youtube player ] Part 3: [ Show youtube player ] And here is the .emacs file I ended up with (for reference purposes, change embedded paths to accommodate your setup) Code:
(setq inhibit-startup-screen t) (show-paren-mode 1) (setq scroll-step 1 scroll-conservatively 10000) (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) (package-initialize) (require 'auto-complete) (require 'auto-complete-config) (ac-config-default) (require 'yasnippet) (yas-global-mode 1) (defun my:ac-c-header-init () (require 'auto-complete-c-headers) (add-to-list 'ac-sources 'ac-source-c-headers) (add-to-list 'achead:include-directories '"/usr/local/amiga/lib/gcc/m68k-amigaos/3.4.0/../../../../include/c++/3.4.0") (add-to-list 'achead:include-directories '"/usr/local/amiga/lib/gcc/m68k-amigaos/3.4.0/../../../../include/c++/3.4.0/m68k-amigaos") (add-to-list 'achead:include-directories '"/usr/local/amiga/lib/gcc/m68k-amigaos/3.4.0/../../../../include/c++/3.4.0/backward") (add-to-list 'achead:include-directories '"/usr/local/amiga/lib/gcc/m68k-amigaos/3.4.0/include") (add-to-list 'achead:include-directories '"/usr/local/amiga/lib/gcc/m68k-amigaos/3.4.0/../../../../m68k-amigaos/sys-include") (add-to-list 'achead:include-directories '"/usr/local/amiga/lib/gcc/m68k-amigaos/3.4.0/../../../../m68k-amigaos/include") ) (add-hook 'c++-mode-hook 'my:ac-c-header-init) (add-hook 'c-mode-hook 'my:ac-c-header-init) (define-key global-map (kbd "C-c ;") 'iedit-mode) (defun my:flymake-google-init () (require 'flymake-google-cpplint) (custom-set-variables '(flymake-google-cpplint-command "/usr/local/bin/cpplint")) (flymake-google-cpplint-load) ) (add-hook 'c-mode-hook 'my:flymake-google-init) (add-hook 'c++-mode-hook 'my:flymake-google-init) (require 'google-c-style) (add-hook 'c-mode-common-hook 'google-set-c-style) (add-hook 'c-mode-common-hook 'google-make-newline-indent) (semantic-mode 1) (defun my:add-semantic-to-autocomplete() (add-to-list 'ac-sources 'ac-source-semantic) ) (add-hook 'c-mode-common-hook 'my:add-semantic-to-autocomplete) (global-ede-mode 1) (global-semantic-idle-scheduler-mode 1) (defun my-semantic-hook () (semantic-add-system-include "/usr/local/amiga/m68k-amigaos/sys-include/" 'c-mode) (semantic-add-system-include "/usr/local/amiga/m68k-amigaos/sys-include/" 'c++-mode) (semantic-add-system-include "/usr/local/amiga/m68k-amigaos/include/" 'c-mode) (semantic-add-system-include "/usr/local/amiga/m68k-amigaos/include/" 'c++-mode)) (add-hook 'semantic-init-hooks 'my-semantic-hook) Cheers. Last edited by alkis; 29 September 2016 at 20:24. Reason: fixed stupid foo.c reference in .emacs |
28 September 2016, 22:23 | #2 |
Registered User
Join Date: Jul 2014
Location: Finland
Posts: 1,178
|
Nice writeup :-)
Emacs was the reason i stopped using Amiga, nothing as powerful around :-) |
28 September 2016, 23:49 | #3 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
|
@Locutus thanks!
Emacs is a beast. I am just beggining to feel a little bit comfortable with...And as the old usenet saying went "Emacs is a nice OS, it just lacks a good editor" |
29 September 2016, 00:03 | #4 |
Registered User
Join Date: Jul 2014
Location: Finland
Posts: 1,178
|
I always explain that Emacs is not a editor; its a runtime for a domain specific LISP oriented on text processing which you use to build your environment.
|
29 September 2016, 23:03 | #5 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,801
|
|
01 October 2016, 23:12 | #6 |
dev
|
Its really cool. Does anything like this exist for KDevelop ?
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Emacs Mode for 68000 assembler | atari900 | Coders. Asm / Hardware | 7 | 16 January 2023 12:01 |
getdoc: An autodoc viewer for linux [Cross-dev tool] | alkis | Coders. General | 2 | 23 September 2016 14:22 |
Debugging messages in serial (small tutorial, mainly for cross-dev) | alkis | Coders. Asm / Hardware | 7 | 22 February 2016 14:16 |
My super simple cross development tool chain - build and run in 15 seconds | xxxxx | Coders. Asm / Hardware | 37 | 23 July 2015 21:15 |
Eclipse-Plugin for Amiga-Cross-development | Paul | News | 1 | 04 September 2004 17:36 |
|
|