"Fossies" - the Fresh Open Source Software Archive 
Member "brlcad-7.32.4/doc/notes/editors.txt" (29 Jul 2021, 3347 Bytes) of package /linux/misc/brlcad-7.32.4.tar.bz2:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 This file documents some of the editor configurations for commonly used
2 text editors that will configure them to work more smoothly with BRL-CAD
3 sources. These are not "official", just tips based on experience.
4
5 ##############################################################################################
6
7 Vim (http://www.vim.org/download.php) .vimrc file:
8
9 " Enable file type detection
10 filetype on
11
12 " Turn on plugin loading and tailored indenting based on file type
13 filetype plugin indent on
14
15 " Enable syntax highlighting
16 syntax enable
17
18 " Make backspace work like most other apps
19 " http://vim.wikia.com/wiki/Backspace_and_delete_problems
20 set backspace=indent,eol,start
21 " If your delete key terminal code is wrong, but the
22 " code for backspace is alright, you can put ':fixdel' in
23 " your .vimrc. This works no matter what the actual code
24 " for backspace is.
25 " http://vimdoc.sourceforge.net/htmldoc/options.html#:fixdel
26 fixdel
27
28 " Set theme from http://www.vim.org/scripts/script.php?script_id=791
29 :colorscheme relaxedgreen
30
31 " Enable modeline support (http://vim.wikia.com/wiki/Modeline_magic)
32 set modeline
33 set modelines=5
34
35 " Advanced LaTeX support:
36 " http://vim-latex.sourceforge.net/
37 "
38 " LaTeX mode settings:
39 " http://vim-latex.sourceforge.net/documentation/latex-suite/recommended-settings.html
40 filetype plugin on
41 set grepprg=grep\ -nH\ $*
42 let g:tex_flavor='latex'
43
44 " Go with US spelling
45 set spell spelllang=en_us
46
47 " Show trailing whitespace:
48 highlight ExtraWhitespace ctermbg=red guibg=red
49 autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red
50 match ExtraWhitespace /\s\+$/
51
52 " Fix C indenting behavior:
53 " http://stackoverflow.com/questions/28217118/vim-indents-c-c-functions-badly-when-the-type-and-name-are-in-different-lines
54 set cinoptions+=t0
55
56 " CMake vim resources:
57 "
58 " Install into ~/.vim/indent/
59 " https://github.com/Kitware/CMake/blob/master/Auxiliary/cmake-indent.vim
60 "
61 " Install into ~/.vim/syntax/
62 " https://github.com/Kitware/CMake/blob/master/Auxiliary/cmake-syntax.vim
63
64 " Trigger CMake mode for various file extensions
65 :autocmd BufRead,BufNewFile *.cmake,CMakeLists.txt,*.cmake.in setf cmake
66 :autocmd BufRead,BufNewFile *.ctest,*.ctest.in setf cmake
67
68 " Tcl resources:
69 " http://www.vim.org/scripts/script.php?script_id=1603
70 " http://www.vim.org/scripts/script.php?script_id=1717
71 :autocmd BufRead,BufNewFile *.tcl,*.tcl.in setf tcl
72
73
74 ##############################################################################################
75
76 Emacs .emacs file:
77
78 ;; Run btclsh within emacs - function set up as
79 ;; discussed in https://emacs.stackexchange.com/q/18672
80 ;;
81 ;; Note also https://superuser.com/q/794145
82 ;;
83 ;; To launch directly into btclsh in terminal mode:
84 ;;
85 ;; emacs -nw -f btclsh
86 ;;
87 (defun btclsh ()
88 (interactive)
89 (require 'term)
90 (let* ((cmd "btclsh")
91 (termbuf (apply 'make-term "btclsh console" cmd nil nil)))
92 (set-buffer termbuf)
93 (term-mode)
94 (term-line-mode)
95 (switch-to-buffer termbuf)))
96
97
98 ;; Nxml mode for DocBook:
99 ;; https://www.gnu.org/software/emacs/manual/html_mono/nxml-mode.html
100 ;; To set the DocBook 5 schema, select the file
101 ;; <path/to/brlcad>/doc/docbook/resources/other/docbook5xi.rnc
102 ;; using XMl->Set Schema->File... from the GUI or C-c C-s C-f in
103 ;; the editor itself.
104 (add-to-list 'auto-mode-alist (cons (concat "\\." (regexp-opt '("xml") t) "\\'") 'nxml-mode))