Gentoo Archives: gentoo-commits

From: "Ben de Groot (yngwin)" <yngwin@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-editors/neovim/files: nvimrc
Date: Thu, 26 Feb 2015 06:08:16
Message-Id: 20150226060810.B0E801292C@oystercatcher.gentoo.org
1 yngwin 15/02/26 06:08:10
2
3 Added: nvimrc
4 Log:
5 initial commit
6
7 (Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key 0x4FDF9CFD2FAC514E!)
8
9 Revision Changes Path
10 1.1 app-editors/neovim/files/nvimrc
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/neovim/files/nvimrc?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/neovim/files/nvimrc?rev=1.1&content-type=text/plain
14
15 Index: nvimrc
16 ===================================================================
17 " Default Gentoo configuration file for neovim
18 " Based on the default vimrc shipped by Gentoo with app-editors/vim-core
19 " $Header: /var/cvsroot/gentoo-x86/app-editors/neovim/files/nvimrc,v 1.1 2015/02/26 06:08:10 yngwin Exp $
20
21 " You can override any of these settings on a global basis via the
22 " "/etc/vim/nvimrc.local" file, and on a per-user basis via "~/.nvimrc".
23 " You may need to create these.
24
25 " {{{ General settings
26 " The following are some sensible defaults for Vim for most users.
27 set bs=2 " Allow backspacing over everything in insert mode
28 set ai " Always set auto-indenting on
29 set history=50 " keep 50 lines of command history
30 set ruler " Show the cursor position all the time
31 set formatoptions+=j " Delete comment character when joining commented lines
32
33 " Don't use Ex mode, use Q for formatting
34 map Q gq
35
36 " When doing tab completion, give the following files lower priority. You may
37 " wish to set 'wildignore' to completely ignore files, and 'wildmenu' to enable
38 " enhanced tab completion. These can be done in the user vimrc file.
39 set suffixes+=.info,.aux,.log,.dvi,.bbl,.out,.o,.lo
40
41 " When displaying line numbers, don't use an annoyingly wide number column. This
42 " doesn't enable line numbers -- :set number will do that. The value given is a
43 " minimum width to use for the number column, not a fixed size.
44 set numberwidth=3
45
46 " Use sensible whitespace indicators
47 set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
48 " }}}
49
50 " {{{ Modeline settings
51 " We don't allow modelines by default. See bug #14088 and bug #73715.
52 " If you're not concerned about these, you can enable them on a per-user
53 " basis by adding "set modeline" to your ~/.vimrc file.
54 set nomodeline
55 " }}}
56
57 " {{{ Locale settings
58 " If we have a BOM, always honour that rather than trying to guess.
59 if &fileencodings !~? "ucs-bom"
60 set fileencodings^=ucs-bom
61 endif
62
63 " Always check for UTF-8 when trying to determine encodings.
64 if &fileencodings !~? "utf-8"
65 " If we have to add this, the default encoding is not Unicode.
66 let g:added_fenc_utf8 = 1
67 set fileencodings+=utf-8
68 endif
69 " }}}
70
71 " {{{ Syntax highlighting settings
72 " Switch syntax highlighting on, when the terminal has colors
73 " Also switch on highlighting the last used search pattern.
74 if &t_Co > 2 || has("gui_running")
75 syntax on
76 set hlsearch
77 endif
78 " }}}
79
80 " {{{ Terminal fixes
81 if &term ==? "xterm"
82 set t_Sb=^[4%dm
83 set t_Sf=^[3%dm
84 set ttymouse=xterm2
85 endif
86
87 if &term ==? "gnome" && has("eval")
88 " Set useful keys that vim doesn't discover via termcap but are in the
89 " builtin xterm termcap. See bug #122562. We use exec to avoid having to
90 " include raw escapes in the file.
91 exec "set <C-Left>=\eO5D"
92 exec "set <C-Right>=\eO5C"
93 endif
94 " }}}
95
96 " {{{ Filetype plugin settings
97 " Enable plugin-provided filetype settings, but only if the ftplugin
98 " directory exists (which it won't on livecds, for example).
99 if isdirectory(expand("$VIMRUNTIME/ftplugin"))
100 filetype plugin on
101
102 " Uncomment the next line (or copy to your ~/.vimrc) for plugin-provided
103 " indent settings. Some people don't like these, so we won't turn them on by
104 " default.
105 " filetype indent on
106 endif
107 " }}}
108
109 " {{{ Fix &shell, see bug #101665.
110 if "" == &shell
111 if executable("/bin/bash")
112 set shell=/bin/bash
113 elseif executable("/bin/sh")
114 set shell=/bin/sh
115 endif
116 endif
117 "}}}
118
119 " {{{ Our default /bin/sh is bash, not ksh, so syntax highlighting for .sh
120 " files should default to bash. See :help sh-syntax and bug #101819.
121 if has("eval")
122 let is_bash=1
123 endif
124 " }}}
125
126 " {{{ Autocommands
127 if has("autocmd")
128
129 augroup gentoo
130 au!
131
132 " Gentoo-specific settings for ebuilds. These are the federally-mandated
133 " required tab settings. See the following for more information:
134 " http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml
135 " Note that the rules below are very minimal and don't cover everything.
136 " Better to emerge app-vim/gentoo-syntax, which provides full syntax,
137 " filetype and indent settings for all things Gentoo.
138 au BufRead,BufNewFile *.e{build,class} let is_bash=1|setfiletype sh
139 au BufRead,BufNewFile *.e{build,class} set ts=4 sw=4 noexpandtab
140
141 " In text files, limit the width of text to 78 characters, but be careful
142 " that we don't override the user's setting.
143 autocmd BufNewFile,BufRead *.txt
144 \ if &tw == 0 && ! exists("g:leave_my_textwidth_alone") |
145 \ setlocal textwidth=78 |
146 \ endif
147
148 " When editing a file, always jump to the last cursor position
149 autocmd BufReadPost *
150 \ if ! exists("g:leave_my_cursor_position_alone") |
151 \ if line("'\"") > 0 && line ("'\"") <= line("$") |
152 \ exe "normal g'\"" |
153 \ endif |
154 \ endif
155
156 " When editing a crontab file, set backupcopy to yes rather than auto. See
157 " :help crontab and bug #53437.
158 autocmd FileType crontab set backupcopy=yes
159
160 " If we previously detected that the default encoding is not UTF-8
161 " (g:added_fenc_utf8), assume that a file with only ASCII characters (or no
162 " characters at all) isn't a Unicode file, but is in the default encoding.
163 " Except of course if a byte-order mark is in effect.
164 autocmd BufReadPost *
165 \ if exists("g:added_fenc_utf8") && &fileencoding == "utf-8" &&
166 \ ! &bomb && search('[\x80-\xFF]','nw') == 0 && &modifiable |
167 \ set fileencoding= |
168 \ endif
169
170 augroup END
171
172 " Strip trailing spaces on write
173 autocmd BufWritePre * :%s/\s\+$//e
174
175 endif " has("autocmd")
176 " }}}
177
178 " {{{ vimrc.local
179 if filereadable("/etc/vim/nvimrc.local")
180 source /etc/vim/nvimrc.local
181 endif
182 " }}}
183
184 " vim: set fenc=utf-8 tw=80 sw=2 sts=2 et foldmethod=marker :