-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathReadme.txt
More file actions
69 lines (42 loc) · 1.89 KB
/
Readme.txt
File metadata and controls
69 lines (42 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Mon, 24 May 2010 17:21
This is the readme for csharp-mode.
You can use csharp-mode alone. To do so,
put this in your .emacs:
(autoload 'csharp-mode "csharp-mode" "Major mode for editing C# code." t)
or:
(require 'csharp-mode)
AND:
(setq auto-mode-alist
(append '(("\\.cs$" . csharp-mode)) auto-mode-alist))
(defun my-csharp-mode-fn ()
"function that runs when csharp-mode is initialized for a buffer."
...insert your code here...
...most commonly, your custom key bindings ...
)
(add-hook 'csharp-mode-hook 'my-csharp-mode-fn t)
=======================================================
You can also take advantage of C# code completion.
To do so, put csharp-completion.el, csharp-shell.el , and powershell.el
on your load-path.
You must also have semantic, from the CEDET package, on your load path.
Put the CscompUtilities.dll in the same location as csharp-shell.el.
Put this in your .emacs file:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; C# code completion (requires CEDET semantic)
(setq load-path
(append '("~/users/dinoch/elisp/cedet/semantic"
"~/users/dinoch/elisp/cedet/semantic/bovine"
"~/users/dinoch/elisp/cedet/common"
"~/users/dinoch/elisp/cedet/eieio"
"~/users/dinoch/elisp/cedet/contrib"
) load-path ))
(load "semantic")
(load "semantic-load")
(load "wisent-csharp")
(require 'csharp-completion)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
In your csharp-mode-hook, bind a key to the cscomp completion trigger.
Like this:
;; C# code completion
(local-set-key "\M-\\" 'cscomp-complete-at-point)
(local-set-key "\M-\." 'cscomp-complete-at-point-menu)