Guest User

Untitled

a guest
Feb 19th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. (add-to-list 'load-path "~/.emacs.d/el")
  2.  
  3. (require 'xcscope)
  4. (require 'cython-mode)
  5.  
  6. (define-key global-map "\M-*" 'pop-tag-mark)
  7.  
  8. (global-set-key (kbd "C-c <left>") 'windmove-left)
  9. (global-set-key (kbd "C-c <down>") 'windmove-down)
  10. (global-set-key (kbd "C-c <up>") 'windmove-up)
  11. (global-set-key (kbd "C-c <right>") 'windmove-right)
  12. (setq windmove-wrap-around t)
  13.  
  14. (global-set-key (kbd "M-SPC") 'set-mark-command)
  15.  
  16. (setq-default comment-style 'multi-line)
  17. (setq comment-style 'extra-line)
  18.  
  19. (setq auto-mode-alist
  20. (append
  21. '(("\\.c$" . c-mode))
  22. '(("\\.h$" . c-mode))
  23. '(("\\.cpp$" . c++-mode))
  24. '(("\\.cxx$" . c++-mode))
  25. '(("\\.cu$". c++-mode))
  26. '(("\\.F$". fortran-mode))
  27. '(("\\.cuf$". f90-mode))
  28. '(("\\.F90$". f90-mode)) auto-mode-alist))
  29.  
  30. (setq require-final-newline t)
  31. ;(setq c-auto-newline t)
  32.  
  33. ;;(setq scroll-step 1)
  34. (setq scroll-conservatively 35
  35. scroll-margin 0
  36. scroll-step 1)
  37.  
  38. ;(require 'vimpulse)
  39.  
  40. (add-hook 'c-mode-hook
  41. '(lambda ()
  42. (c-set-style "linux")
  43. (c-set-offset 'inline-open '0)
  44. ))
  45.  
  46. (add-hook 'c++-mode-hook
  47. '(lambda ()
  48. (c-set-style "stroustrup")
  49. (c-set-offset 'inline-open '0)
  50. ))
  51. (defun linux-c-mode ()
  52. "C mode with adjusted defaults for use with the Linux kernel."
  53. (interactive)
  54. (c-mode)
  55. (setq c-indent-level 8)
  56. (setq c-brace-imaginary-offset 0)
  57. (setq c-brace-offset -8)
  58. (setq c-argdecl-indent 8)
  59. (setq c-label-offset -8)
  60. (setq c-continued-statement-offset 8)
  61. (setq indent-tabs-mode nil)
  62. (setq tab-width 8))
Add Comment
Please, Sign In to add comment