Fixed vim and zsh
This commit is contained in:
20
vim/plugins/deoplete-jedi/tests/README.md
Normal file
20
vim/plugins/deoplete-jedi/tests/README.md
Normal file
@ -0,0 +1,20 @@
|
||||
# For deoplete-jedi test files
|
||||
|
||||
```bash
|
||||
$ nvim -u ./tests/jedi-deoplete.vim tests/test-jedi.py
|
||||
```
|
||||
|
||||
in nvim,
|
||||
|
||||
```vim
|
||||
:UpdateRemotePlugins
|
||||
:quit
|
||||
```
|
||||
|
||||
again,
|
||||
|
||||
```bash
|
||||
$ nvim -u ./tests/jedi-deoplete.vim tests/test-jedi.py
|
||||
```
|
||||
|
||||
test it.
|
31
vim/plugins/deoplete-jedi/tests/jedi-deoplete-conflict.vim
Normal file
31
vim/plugins/deoplete-jedi/tests/jedi-deoplete-conflict.vim
Normal file
@ -0,0 +1,31 @@
|
||||
" Tiny init.vim for deoplete-jedi
|
||||
|
||||
" NeoBundle
|
||||
set runtimepath+=$XDG_CONFIG_HOME/nvim/bundle/deoplete.nvim
|
||||
set runtimepath+=$XDG_CONFIG_HOME/nvim/bundle/deoplete-jedi
|
||||
set runtimepath+=$XDG_CONFIG_HOME/nvim/bundle/neco-syntax
|
||||
set runtimepath+=$XDG_CONFIG_HOME/nvim/bundle/neoinclude.vim
|
||||
|
||||
" vim-plug
|
||||
set runtimepath+=$XDG_CONFIG_HOME/nvim/plugged/deoplete.nvim
|
||||
set runtimepath+=$XDG_CONFIG_HOME/nvim/plugged/deoplete-jedi
|
||||
set runtimepath+=$XDG_CONFIG_HOME/nvim/plugged/neco-syntax
|
||||
set runtimepath+=$XDG_CONFIG_HOME/nvim/plugged/neoinclude.vim
|
||||
|
||||
set completeopt+=noinsert,noselect
|
||||
set completeopt-=preview
|
||||
|
||||
hi Pmenu gui=NONE guifg=#c5c8c6 guibg=#373b41
|
||||
hi PmenuSel gui=reverse guifg=#c5c8c6 guibg=#373b41
|
||||
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
let g:deoplete#auto_completion_start_length = 1
|
||||
|
||||
" let g:deoplete#ignore_sources = {}
|
||||
" let g:deoplete#ignore_sources.python = ['omni']
|
||||
" let g:deoplete#ignore_sources.python += ['buffer']
|
||||
" let g:deoplete#ignore_sources.python += ['tag']
|
||||
" let g:deoplete#ignore_sources.python += ['ns']
|
||||
" let g:deoplete#ignore_sources.python += ['member']
|
||||
|
||||
filetype plugin indent on
|
21
vim/plugins/deoplete-jedi/tests/jedi-deoplete.vim
Normal file
21
vim/plugins/deoplete-jedi/tests/jedi-deoplete.vim
Normal file
@ -0,0 +1,21 @@
|
||||
" Tiny init.vim for deoplete-jedi
|
||||
|
||||
" NeoBundle
|
||||
set runtimepath+=$XDG_CONFIG_HOME/nvim/bundle/deoplete.nvim
|
||||
set runtimepath+=$XDG_CONFIG_HOME/nvim/bundle/deoplete-jedi
|
||||
|
||||
" vim-plug
|
||||
set runtimepath+=$XDG_CONFIG_HOME/nvim/plugged/deoplete.nvim
|
||||
set runtimepath+=$XDG_CONFIG_HOME/nvim/plugged/deoplete-jedi
|
||||
set completeopt+=noinsert,noselect
|
||||
set completeopt-=preview
|
||||
|
||||
hi Pmenu gui=NONE guifg=#c5c8c6 guibg=#373b41
|
||||
hi PmenuSel gui=reverse guifg=#c5c8c6 guibg=#373b41
|
||||
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
let g:deoplete#auto_completion_start_length = 1
|
||||
" let g:deoplete#ignore_sources = {}
|
||||
" let g:deoplete#ignore_sources.python = ['omni']
|
||||
|
||||
filetype plugin indent on
|
29
vim/plugins/deoplete-jedi/tests/jedi-omnifunc.vim
Normal file
29
vim/plugins/deoplete-jedi/tests/jedi-omnifunc.vim
Normal file
@ -0,0 +1,29 @@
|
||||
" Tiny init.vim for jedi-vim omnifunc
|
||||
|
||||
" NeoBundle
|
||||
set runtimepath+=$XDG_CONFIG_HOME/nvim/bundle/deoplete.nvim
|
||||
set runtimepath+=$XDG_CONFIG_HOME/nvim/bundle/jedi-vim
|
||||
|
||||
" vim-plug
|
||||
set runtimepath+=$XDG_CONFIG_HOME/nvim/plugged/deoplete.nvim
|
||||
set runtimepath+=$XDG_CONFIG_HOME/nvim/plugged/jedi-vim
|
||||
|
||||
set completeopt+=noinsert,noselect
|
||||
set completeopt-=preview
|
||||
|
||||
hi Pmenu gui=NONE guifg=#c5c8c6 guibg=#373b41
|
||||
hi PmenuSel gui=reverse guifg=#c5c8c6 guibg=#373b41
|
||||
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
let g:deoplete#auto_completion_start_length = 1
|
||||
set omnifunc=jedi#completions
|
||||
let g:jedi#auto_initialization = 1
|
||||
let g:jedi#auto_vim_configuration = 0
|
||||
let g:jedi#popup_select_first = 0
|
||||
let g:jedi#completions_enabled = 0
|
||||
let g:jedi#force_py_version = 3
|
||||
let g:jedi#smart_auto_mappings = 0
|
||||
let g:jedi#show_call_signatures = 0
|
||||
let g:jedi#max_doc_height = 100
|
||||
|
||||
filetype plugin indent on
|
3
vim/plugins/deoplete-jedi/tests/requirements.txt
Normal file
3
vim/plugins/deoplete-jedi/tests/requirements.txt
Normal file
@ -0,0 +1,3 @@
|
||||
flake8>=2.5.4
|
||||
flake8-import-order>=0.6.1
|
||||
hacking>=0.10.2
|
3002
vim/plugins/deoplete-jedi/tests/sphinx-3000.py
Normal file
3002
vim/plugins/deoplete-jedi/tests/sphinx-3000.py
Normal file
File diff suppressed because it is too large
Load Diff
3
vim/plugins/deoplete-jedi/tests/test-jedi.py
Normal file
3
vim/plugins/deoplete-jedi/tests/test-jedi.py
Normal file
@ -0,0 +1,3 @@
|
||||
import jedi
|
||||
|
||||
jedi
|
41
vim/plugins/deoplete-jedi/tests/test.py
Normal file
41
vim/plugins/deoplete-jedi/tests/test.py
Normal file
@ -0,0 +1,41 @@
|
||||
import re
|
||||
import csv
|
||||
from time import localtime
|
||||
|
||||
for test_string in ['555-1212', 'ILL-EGAL']:
|
||||
if re.match(r'^\d{3}-\d{4}$', test_string):
|
||||
print test_string, 'is a valid US local phone number'
|
||||
else:
|
||||
print test_string, 'rejected'
|
||||
|
||||
# write stocks data as comma-separated values
|
||||
writer = csv.writer(open('stocks.csv', 'wb', buffering=0))
|
||||
writer.writerows([
|
||||
('GOOG', 'Google, Inc.', 505.24, 0.47, 0.09),
|
||||
('YHOO', 'Yahoo! Inc.', 27.38, 0.33, 1.22),
|
||||
('CNET', 'CNET Networks, Inc.', 8.62, -0.13, -1.49)
|
||||
])
|
||||
|
||||
# read stocks data, print status messages
|
||||
stocks = csv.reader(open('stocks.csv', 'rb'))
|
||||
status_labels = {-1: 'down', 0: 'unchanged', 1: 'up'}
|
||||
for ticker, name, price, change, pct in stocks:
|
||||
status = status_labels[cmp(float(change), 0.0)]
|
||||
print '%s is %s (%s%%)' % (name, status, pct)
|
||||
|
||||
activities = {8: 'Sleeping',
|
||||
9: 'Commuting',
|
||||
17: 'Working',
|
||||
18: 'Commuting',
|
||||
20: 'Eating',
|
||||
22: 'Resting'}
|
||||
|
||||
time_now = localtime()
|
||||
hour = time_now.tm_hour
|
||||
|
||||
for activity_time in sorted(activities.keys()):
|
||||
if hour < activity_time:
|
||||
print activities[activity_time]
|
||||
break
|
||||
else:
|
||||
print 'Unknown, AFK or sleeping!'
|
Reference in New Issue
Block a user