Fixed vim and zsh

This commit is contained in:
2018-04-05 13:06:54 +02:00
parent f9db886bd3
commit 0331f6518a
2009 changed files with 256303 additions and 0 deletions

View 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.

View 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

View 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

View 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

View File

@ -0,0 +1,3 @@
flake8>=2.5.4
flake8-import-order>=0.6.1
hacking>=0.10.2

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
import jedi
jedi

View 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!'