/
navim.txt
442 lines (300 loc) · 11.6 KB
/
navim.txt
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
*navim.txt* A full-blown IDE based on Neovim (or Vim) with better navigation.
Version: 1.0.0
Author: taohe <taohex@gmail.com>
License: MIT license
==============================================================================
CONTENTS *navim-contents*
Introduction |navim-introduction|
Key Mapping |navim-key-mapping|
Basic Installation |navim-basic-installation|
Advanced Settings |navim-advanced-settings|
Commands |navim-commands|
Functions |navim-functions|
Variables |navim-variables|
Options |navim-options|
Advanced Installation |navim-advanced-installation|
macOS |navim-macos|
Plugins |navim-plugins|
Fonts |navim-fonts|
Tags |navim-tags|
Coding Style |navim-coding-style|
FAQ |navim-faq|
Compatibility |navim-compatibility|
==============================================================================
INTRODUCTION *navim-introduction*
The ultimate Neovim distribution
==============================================================================
KEY MAPPING *navim-key-mapping*
You don't need to remember any key mapping, as navigation bar will show up
immediately after the leader key (<Space> by default) is pressed.
Default <Leader> is <Space>, default <LocalLeader> is <Comma>.
For example, <Space> s s search the word under cursor.
Key mapping is carefully-chosen.
*navim-key-mapping-left-right*
<Left> or <Right>
previous buffer, next buffer
*navim-key-mapping-move-window*
<C-h>, <C-j>, <C-k> or <C-l>
move to window in the direction
*navim-key-mapping-maximize-window*
<C-w> o
maximize or restore current window in split structure
*navim-key-mapping-close-window*
Q
close windows and delete the buffer (if it is the last buffer window)
==============================================================================
BASIC INSTALLATION *navim-basic-installation*
Basic installation is simple:
>
git clone https://github.com/taohexxx/navim ~/.config/nvim
cd ~/.config/nvim/
git submodule init && git submodule update
<
Make links if you are using Vim:
>
mv ~/.vim ~/.vim.backup
mv ~/.vimrc ~/.vimrc.backup
ln -s ~/.config/nvim ~/.vim
ln -s ~/.config/nvim/init.vim ~/.vimrc
<
Startup vim and dein will detect and ask you install any missing plugins.
==============================================================================
ADVANCED SETTINGS *navim-advanced-settings*
Plugins are nicely organised in layers.
There are many ready-to-use layers (javascript, navigation, scm, web, etc.)
and you can add your own ones.
Private layers can be added to "private_layers/".
And Private plugins can be added to "private_bundle/".
The content of these two directory is ignored by Git.
It is completely customisable using a "~/.navimrc" file.
Just copy ".navimrc.sample" to "~/.navimrc" and modify anything.
After restart Neovim (or Vim),
run "call dein#clear_state() || call dein#update()" to apply changes.
------------------------------------------------------------------------------
COMMANDS *navim-commands*
*navim-xtermcolortable*
XtermColorTable
show color table
*navim-syntax*
syntax
show syntax highlight
------------------------------------------------------------------------------
FUNCTIONS *navim-functions*
------------------------------------------------------------------------------
VARIABLES *navim-variables*
In most instances, modify "g:navim_settings" in "~/.navimrc" should meet
your needs.
*g:navim_settings.layers*
g:navim_settings.layers
Files in "layers/" or "private_layers/".
Example: ['c', 'completion', 'editing']
*g:navim_settings.additional_plugins*
g:navim_settings.additional_plugins
Github repo.
Example: ['joshdick/onedark.vim', 'edkolev/tmuxline.vim']
*g:navim_settings.encoding*
g:navim_settings.encoding
Select from files in "encoding/".
Values: 'utf-8', 'gbk', 'latin1', ...
*g:navim_settings.bin_dir*
g:navim_settings.bin_dir
Set bin directory for cscope, ctags, gdb, ...
Example: '/usr/local/bin'
g:navim_settings.clang_dir
g:navim_settings.clang_dir
Set install directory for clang.
Example: '/usr/local'
g:navim_settings.cscopeprg
g:navim_settings.cscopeprg
Set cscope program.
Example: 'gtags-cscope'
*g:navim_settings.explorer_plugin*
g:navim_settings.explorer_plugin
Explorer plugin.
Values: 'nerdtree', 'vimfiler'
*g:navim_settings.statusline_plugin*
g:navim_settings.statusline_plugin
Statusline plugin.
Values: 'airline', 'lightline'
*g:navim_settings.completion_plugin*
g:navim_settings.completion_plugin
Completion plugin.
Values: '', 'deoplete', 'coc', 'ycm'
*g:navim_settings.syntaxcheck_plugin*
g:navim_settings.syntaxcheck_plugin
Syntax check plugin.
Values: '', 'ale', 'syntastic'
*g:navim_settings.colorscheme*
g:navim_settings.colorscheme
Use other colorschemes in |g:navim_settings.additional_plugins| or
|g:navim_settings.layers| is supported.
Values: 'solarized', 'molokai', 'jellybeans'
*g:navim_settings.powerline_fonts*
g:navim_settings.powerline_fonts
Requires "https://github.com/taohexxx/font"
Values: 1, 0
*g:navim_settings.nerd_fonts*
g:navim_settings.nerd_fonts
Requires "https://github.com/taohexxx/font"
Values: 1, 0
------------------------------------------------------------------------------
OPTIONS *navim-options*
The {options} accepts the following keys:
==============================================================================
ADVANCED INSTALLATION *navim-advanced-installation*
------------------------------------------------------------------------------
MACOS *navim-macos*
YouComplete only support Neovim or MacVim.
*navim-macos-install-neovim*
Install Neovim (Recommended)
>
pip install --upgrade pip
pip3 install --upgrade pip
pip install --user --upgrade neovim
pip3 install --user --upgrade neovim
brew tap neovim/neovim
brew update
brew reinstall --HEAD neovim
<
Make alias
>
alias vi='nvim'
alias vim="nvim"
alias vimdiff="nvim -d"
<
If <C-h> does not work in neovim, add these line to "~/.zshrc"
>
infocmp $TERM | sed 's/kbs=^[hH]/kbs=\\177/' > $TERM.ti
tic $TERM.ti
<
Execute the ":UpdateRemotePlugins" and restart Neovim.
*navim-macos-install-macvim*
Install MacVim
>
brew install macvim --with-luajit --override-system-vim
<
Make alias
>
alias vi="mvim -v"
alias vim="mvim -v"
alias vimdiff="mvim -d -v"
<
*navim-macos-install-global*
Install GLOBAL
>
brew install global
<
*navim-macos-quick-compile-ycm*
Quick Compile YouCompleteMe
>
cd ~/.config/nvim/bundle/repos/github.com/Valloric/YouCompleteMe/
./install.sh --all
# or
# ./install.sh --clang-completer --go-completer --js-completer
Check for "~/.config/nvim/bundle/repos/github.com/Valloric/YouCompleteMe/third_party/ycmd/libclang.dylib"
and "~/.config/nvim/bundle/repos/github.com/Valloric/YouCompleteMe/third_party/ycmd/ycm_core.so", done
TypeScript Support
yarn global add typescript
Done
*navim-macos-full-compile-ycm*
Full Compile YouCompleteMe
Try this if quick compile does not work
>
mkdir -p ~/.config/nvim/bundle/repos/github.com/Valloric/
cd ~/.config/nvim/bundle/repos/github.com/Valloric/
git clone https://github.com/Valloric/YouCompleteMe
cd YouCompleteMe/
git submodule update --init --recursive
<
Download clang from "http://llvm.org/releases/download.html" to "~/local/src/"
and compile ycm_core
>
mkdir -p ~/local/src/
cd ~/local/src/
tar xf clang+llvm-6.0.0-x86_64-apple-darwin.tar.xz
mkdir -p ~/local/src/ycm_build/
cd ~/local/src/ycm_build/
cmake -G "Unix Makefiles" \
-DPATH_TO_LLVM_ROOT=~/local/src/clang+llvm-6.0.0-x86_64-apple-darwin \
. ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp
cmake --build . --target ycm_core --config Release
<
Check for "~/.vim/bundle/YouCompleteMe/third_party/ycmd/libclang.dylib"
and "~/.vim/bundle/YouCompleteMe/third_party/ycmd/ycm_core.so", done
Compile regex (Optional)
cmake -G "Unix Makefiles" . ~/.config/nvim/bundle/repos/github.com/Valloric/YouCompleteMe/third_party/ycmd/third_party/cregex
cmake --build . --target _regex --config Release
Check for "~/.config/nvim/bundle/repos/github.com/Valloric/YouCompleteMe/third_party/ycmd/third_party/cregex/regex_3/_regex.so", done
Go Support
cd ~/.config/nvim/bundle/repos/github.com/Valloric/YouCompleteMe/third_party/ycmd/third_party/gocode
go build
JavaScript Support
cd ~/.config/nvim/bundle/repos/github.com/Valloric/YouCompleteMe/third_party/ycmd/third_party/tern_runtime
yarn install --production
TypeScript Support
yarn global add typescript
Done
*navim-macos-project-config*
Project Configuration
Download "https://raw.githubusercontent.com/Valloric/ycmd/master/cpp/ycm/.ycm_extra_conf.py"
to your project directory
==============================================================================
PLUGINS *navim-plugins*
denite.nvim https://github.com/Shougo/denite.nvim
unite.vim https://github.com/Shougo/unite.vim
lightline.vim https://github.com/itchyny/lightline.vim
lightline-buffer https://github.com/taohexxx/lightline-buffer
deoplete https://github.com/Shougo/deoplete.nvim
vimfiler.vim https://github.com/Shougo/vimfiler.vim
unimpaired https://github.com/tpope/vim-unimpaired
editorconfig https://github.com/editorconfig/editorconfig-vim
...
==============================================================================
FONTS *navim-fonts*
If 'g:navim_settings.powerline_fonts' or 'g:navim_settings.nerd_fonts' is 1,
you need to configure your terminal font from one of the following repos:
taohe's font https://github.com/taohexxx/font
ryanoasis's font https://github.com/ryanoasis/nerd-fonts
==============================================================================
TAGS *navim-tags*
"~/.config/nvim/tags/*.tags" will be auto added.
Build from LLVM ("http://releases.llvm.org/download.html")
>
tar xf libcxx.src.tar.xz
cp -R libcxx/include ~/.config/nvim/tags/libcxx
ctags -f libcxx.tags -R --c++-kinds=+p --fields=+iaS --extra=+q \
--language-force=C++ --sort=foldcase -I _NOEXCEPT libcxx
<
Build from GCC ("https://gcc.gnu.org/mirrors.html")
>
cp -R gcc/libstdc++-v3/include ~/.config/nvim/tags/libstdcpp
find libstdcpp -type f -print0 | xargs -0 sed -i '' \
's/namespace std _GLIBCXX_VISIBILITY(default)/namespace std/g'
ctags -f libstdcpp.tags -R --c++-kinds=+p --fields=+iaS --extra=+q \
--language-force=C++ --sort=foldcase -I _GLIBCXX_NOEXCEPT libstdcpp
<
Build from system or Modified Headers ("http://www.vim.org/scripts/script.php?script_id=2358")
>
cp -R /usr/include/c++/$GCC_VERSION ~/.config/nvim/tags/old_libstdcpp
# it is not necessary to rename headers without an extension
# replace the "namespace std _GLIBCXX_VISIBILITY(default)"
# with "namespace std"
find old_libstdcpp -type f -print0 | xargs -0 sed -i '' \
's/namespace std _GLIBCXX_VISIBILITY(default)/namespace std/g'
ctags -f old_libstdcpp.tags -R --c++-kinds=+p --fields=+iaS \
--extra=+q --language-force=C++ --sort=foldcase \
-I _GLIBCXX_NOEXCEPT old_libstdcpp
<
==============================================================================
CODING STYLE *navim-coding-style*
EditorConfig is supported.
Create an `.editorconfig` in any parent directory for consistent coding styles.
Reference "http://editorconfig.org/".
==============================================================================
FAQ *navim-faq*
==============================================================================
COMPATIBILITY *navim-compatibility*
macOS: Neovim or MacVim 8.
linux: Neovim or Vim 8.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:noet:fen: