Skip to content

Commit 51da213

Browse files
committed
init
0 parents  commit 51da213

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+26033
-0
lines changed

.VimballRecord

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
conque_2.3.vmb: call delete('/home/xy/.vim/autoload/conque_term.vim')|call delete('/home/xy/.vim/autoload/conque_term/conque_globals.py')|call delete('/home/xy/.vim/autoload/conque_term/conque.py')|call delete('/home/xy/.vim/autoload/conque_term/conque_screen.py')|call delete('/home/xy/.vim/autoload/conque_term/conque_sole_communicator.py')|call delete('/home/xy/.vim/autoload/conque_term/conque_sole.py')|call delete('/home/xy/.vim/autoload/conque_term/conque_sole_shared_memory.py')|call delete('/home/xy/.vim/autoload/conque_term/conque_sole_subprocess.py')|call delete('/home/xy/.vim/autoload/conque_term/conque_sole_wrapper.py')|call delete('/home/xy/.vim/autoload/conque_term/conque_subprocess.py')|call delete('/home/xy/.vim/autoload/conque_term/conque_win32_util.py')|call delete('/home/xy/.vim/doc/conque_term.txt')|call delete('/home/xy/.vim/plugin/conque_term.vim')|call delete('/home/xy/.vim/syntax/conque_term.vim')
2+
supertab.vmb: call delete('/home/xy/.vim/doc/supertab.txt')|call delete('/home/xy/.vim/plugin/supertab.vim')

.netrwhist

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
let g:netrw_dirhistmax =10
2+
let g:netrw_dirhist_cnt =1
3+
let g:netrw_dirhist_1='/home/xy/p/libpomelo2.c/src'

.vimrc

+183
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
let g:vim_markdown_folding_disabled=1
2+
let g:vim_markdown_initial_foldlevel=1
3+
4+
set shortmess=atl
5+
set nu
6+
syntax on
7+
autocmd InsertLeave * se nocul
8+
autocmd InsertEnter * se cul
9+
set ruler
10+
set showcmd
11+
set foldenable
12+
set foldmethod=manual
13+
set nocompatible
14+
15+
set encoding=utf-8
16+
set fencs=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
17+
set termencoding=utf-8
18+
set fileencodings=utf-8,ucs-bom,cp936
19+
set fileencoding=utf-8
20+
21+
set autoread
22+
23+
" set system clipboard to unnamedplus buffer
24+
set clipboard=unnamedplus
25+
set tabstop=2
26+
set softtabstop=2
27+
set autoindent
28+
set shiftwidth=2
29+
set expandtab
30+
31+
set cindent
32+
set softtabstop=2
33+
set hlsearch
34+
set incsearch
35+
set ignorecase
36+
set mouse=a
37+
set showmatch
38+
set smartindent
39+
"set autochdir
40+
"set list
41+
42+
nnoremap <C-h> <C-w>h
43+
nnoremap <C-j> <C-w>j
44+
nnoremap <C-k> <C-w>k
45+
nnoremap <C-l> <C-w>l
46+
47+
"
48+
imap i18n internationalization
49+
imap destory destroy
50+
imap teh the
51+
imap inculde include
52+
53+
let mapleader = ","
54+
55+
nmap <leader>t :NERDTreeToggle <CR>
56+
nmap <leader>s :ConqueTermSplit zsh <CR>
57+
58+
nmap <leader>x :q! <CR>
59+
nmap <leader>z :q <CR>
60+
61+
nmap <leader>h <C-h>
62+
nmap <leader>j <C-j>
63+
nmap <leader>k <C-k>
64+
nmap <leader>l <C-l>
65+
66+
67+
" taglist
68+
nmap <leader>d :TlistToggle <CR>
69+
70+
" ctags shortcut
71+
nmap <leader>f <C-]>
72+
nmap <leader>r <C-t>
73+
nmap <leader>o <C-o>
74+
75+
nmap <leader>n :tn <CR>
76+
nmap <leader>p :tp <CR>
77+
78+
" cscope shortcut
79+
set cscopequickfix=c-,d-,e-,g-,i-,s-,t-
80+
81+
nmap <leader>cg :cs find g <C-R>=expand("<cword>")<CR><CR>
82+
nmap <leader>cs :cs find s <C-R>=expand("<cword>")<CR><CR>
83+
nmap <leader>cc :cs find c <C-R>=expand("<cword>")<CR><CR>
84+
nmap <leader>ct :cs find t <C-R>=expand("<cword>")<CR><CR>
85+
nmap <leader>ce :cs find e <C-R>=expand("<cword>")<CR><CR>
86+
nmap <leader>cf :cs find f <C-R>=expand("<cfile>")<CR><CR>
87+
nmap <leader>ci :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
88+
nmap <leader>cd :cs find d <C-R>=expand("<cword>")<CR><CR>
89+
90+
nmap <leader>cn :cn <CR>
91+
nmap <leader>cp :cp <CR>
92+
93+
let Tlist_Use_Right_Window = 1
94+
95+
colors evening
96+
" autocmd VimEnter * NERDTree
97+
filetype on
98+
99+
let NERDTreeShowBookmarks=1
100+
let NERDTreeMouseMode=2
101+
102+
execute pathogen#infect()
103+
filetype plugin indent on
104+
filetype plugin on
105+
filetype on
106+
107+
autocmd FileType c set shiftwidth=4 | set expandtab
108+
autocmd FileType cpp,python set shiftwidth=4 | set expandtab
109+
autocmd FileType javascript set shiftwidth=2 | set expandtab
110+
111+
" for omniComplete
112+
set nocp
113+
"set tags=/home/xy/p/linux.uv/uv/tags,/home/xy/p/libzmq.c/tags,/usr/src/linux-source-3.2.0/linux-source-3.2.0/tags
114+
115+
set nocompatible
116+
set tags=tags
117+
:cs add ./cscope.out
118+
if filereadable("cscope.out")
119+
cs add ./cscope.out
120+
end
121+
122+
if filereadable("tags")
123+
set tags+=tags
124+
end
125+
126+
if filereadable(".tags")
127+
set tags+=.tags
128+
end
129+
130+
" filetype off
131+
" set rtp+=~/.vim/bundle/vundle/
132+
" call vundle#rc()
133+
" set nocompatible " be iMproved
134+
" filetype off " required!
135+
" set rtp+=~/.vim/bundle/vundle/
136+
" call vundle#rc()
137+
138+
" let Vundle manage Vundle
139+
" Bundle 'gmarik/vundle'
140+
141+
" my Bundle here:
142+
"
143+
"
144+
" original repos on github
145+
" Bundle 'kien/ctrlp.vim'
146+
" Bundle 'sukima/xmledit'
147+
" Bundle 'sjl/gundo.vim'
148+
" Bundle 'jiangmiao/auto-pairs'
149+
" Bundle 'klen/python-mode'
150+
" Bundle 'Valloric/ListToggle'
151+
" Bundle 'SirVer/ultisnips'
152+
" Bundle 'Valloric/YouCompleteMe'
153+
" Bundle 'scrooloose/syntastic'
154+
" Bundle 't9md/vim-quickhl'
155+
" Bundle 'Lokaltog/vim-powerline'
156+
" Bundle 'scrooloose/nerdcommenter'
157+
"..................................
158+
" vim-scripts repos
159+
160+
" Bundle 'YankRing.vim'
161+
" Bundle 'vcscommand.vim'
162+
" Bundle 'ShowPairs'
163+
" Bundle 'SudoEdit.vim'
164+
" Bundle 'EasyGrep'
165+
" Bundle 'VOoM'
166+
" Bundle 'VimIM'
167+
"..................................
168+
" non github repos
169+
" Bundle 'git://git.wincent.com/command-t.git'
170+
"......................................
171+
filetype plugin indent on
172+
173+
"
174+
"p
175+
"vnoremap _g y:exe "grep /" . escape(@", ’\\/’) . "/ *.c *.h"<CR>
176+
"`
177+
" autocmd FileType text setlocal textwidth=78
178+
179+
set tags+=./tags
180+
cs add ./cscope.out
181+
set path+=.
182+
183+

README.md

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
vim-nodejs-complete
2+
===================
3+
4+
Nodejs `'omnifunc'` function of vim
5+
6+
Support node's builtin module's method&property completion(`ctrl-x ctrl-o`) in `js` file with preview.
7+
8+
9+
## Install
10+
Download the [tarball](https://github.com/myhere/vim-nodejs-complete/zipball/master) and extract to your vimfiles(`~/.vim` or `~/vimfiles`) folder.
11+
12+
Completion require `:filetype plugin on`, please make sure it's on.
13+
14+
## Settings
15+
All the settings is optional.
16+
17+
```viml
18+
let g:nodejs_complete_config = {
19+
\ 'js_compl_fn': 'jscomplete#CompleteJS',
20+
\ 'max_node_compl_len': 15
21+
\}
22+
```
23+
24+
### js_compl_fn
25+
* `String` function name, called to complete javascript
26+
* default to `javascriptcomplete#CompleteJS`
27+
* if you want to integrate with [jscomplete](https://github.com/teramako/jscomplete-vim), set it to `jscomplete#CompleteJS`, make sure it's installed.
28+
29+
### max_node_compl_len
30+
* `Number`, length of nodejs complete items. set to 0 if unlimited
31+
32+
33+
## Example
34+
35+
```js
36+
var fs = req
37+
// then hit ctrl-x_ctrl-o you'll get:
38+
var fs = require(
39+
// and then hit ctrl-x_ctrl-o again you'll get module name completion
40+
41+
var fs = require('f
42+
// then hit ctrl-x_ctrl-o
43+
44+
fs.
45+
// then hit ctrl-x_ctrl-o
46+
47+
proc
48+
// then hit ctrl-x_ctrl-o
49+
50+
process.ex
51+
// then hit ctrl-x_ctrl-o
52+
```
53+
54+
55+
## Tip
56+
1. Close the method preview window
57+
58+
`ctrl-w_ctrl-z` or `:pc`.
59+
60+
If you want close it automatically, put the code(from [spf13-vim](https://github.com/spf13/spf13-vim/blob/3.0/.vimrc)) below in your `.vimrc` file.
61+
62+
```vim
63+
" automatically open and close the popup menu / preview window
64+
au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
65+
```
66+
67+
2. About vim's complete
68+
69+
Vim supports several kinds of completion, `:h ins-completion` for help.
70+
71+
3. Completion of module in `node_modules` will cache result of every `js` file
72+
73+
If you modified module in `node_modules` directory, use code below to clear the cache.
74+
75+
```vim
76+
:unlet b:npm_module_names
77+
```
78+
79+
80+
## Feedback
81+
[feedback or advice or feature-request](https://github.com/myhere/vim-nodejs-complete/issues)
82+

after/autoload/nodejs-doc.vim

+2
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)