-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba75a77
commit 60bbe71
Showing
5 changed files
with
21 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
|
||
VIM_MYSQL=`pwd` | ||
echo $VIM_MYSQL | ||
echo `pwd` | ||
|
||
ln -sf ${VIM_MYSQL}/plugin/mysql_run /usr/local/bin/mysql_run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,29 @@ | ||
function! HelloWorld() | ||
echo "hello world" | ||
endfunction | ||
|
||
python << EOF | ||
import os | ||
def helloworld(sql): | ||
print('hello') | ||
EOF | ||
|
||
function! Test() | ||
function! s:Test() | ||
python << EOF | ||
import vim | ||
import commands | ||
cur_buf = vim.current.buffer | ||
print("cur_buf {}".format(cur_buf)) | ||
print "Lines: {0}".format(len(cur_buf)) | ||
print "Contents: {0}".format(cur_buf[-1]) | ||
|
||
print( vim.current.line ) | ||
print("cur_line {}".format(vim.current.line )) | ||
print( vim.current.buffer ) | ||
print( vim.current.window ) | ||
print( vim.current.tabpage ) | ||
print( vim.current.range ) | ||
|
||
EOF | ||
endfunction | ||
s, msg = commands.getstatusoutput('ls') | ||
print(msg) | ||
|
||
" function! GetVisualSelection() | ||
" " Why is this not a built-in Vim script function?! | ||
" let [line_start, column_start] = getpos("'<")[1:2] | ||
" let [line_end, column_end] = getpos("'>")[1:2] | ||
" echo line_start | ||
" echo column_start | ||
" echo line_end | ||
" echo column_end | ||
" let lines = getline(line_start, line_end) | ||
" if len(lines) == 0 | ||
" return '' | ||
" endif | ||
" let lines[-1] = lines[-1][: column_end - (&selection == 'inclusive' ? 1 : 2)] | ||
" let lines[0] = lines[0][column_start - 1:] | ||
" echo join(lines, "\n") | ||
" return join(lines, "\n") | ||
" endfunction | ||
|
||
function! Bar() abort | ||
bar | ||
endfunction | ||
|
||
function! Foo() | ||
try | ||
call Bar() | ||
catch /.*/ | ||
let bt = lh#exception#callstack(v:throwpoint) | ||
let data = map(copy(bt), '{"filename": v:val.script, "text": "called from here", "lnum": v:val.pos}') | ||
let data[0].text = v:exception | ||
call setqflist(data) | ||
endtry | ||
EOF | ||
endfunction | ||
|
||
" command! -nargs=0 HelloWorld call HelloWorld() | ||
" command! -nargs=0 Hpy exec('py hello("ls")') | ||
" command! -nargs=0 Test call Test() | ||
" command! -nargs=0 Gv call Get_visual_selection() | ||
" command! -nargs=0 GV call GetVisualSelection() | ||
|
||
call s:Test() |