soywiki 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +1 -1
- data/lib/soywiki.rb +1 -1
- data/lib/soywiki.vim +5 -8
- metadata +2 -2
data/README.markdown
CHANGED
@@ -169,7 +169,7 @@ commands:
|
|
169
169
|
|
170
170
|
* `CTRL-j` and `CTRL-k` move the cursor directly to the next or previous WikiLink on the page
|
171
171
|
* `ENTER` follows the WikiLink under the cursor
|
172
|
-
* If there is
|
172
|
+
* If there is no WikiLink under the cursor, `ENTER` is equivalent to `CTRL-w p` and moves the cursor to the last accessed window
|
173
173
|
* `,f` follows the first WikiLink after the cursor
|
174
174
|
* `CTRL-l` opens a WikiLink in a vertical split window; press `CTRL-l` again
|
175
175
|
while the cursor is on the top line to close the new window
|
data/lib/soywiki.rb
CHANGED
data/lib/soywiki.vim
CHANGED
@@ -127,19 +127,16 @@ func! s:find_next_wiki_link(backward)
|
|
127
127
|
endfunc
|
128
128
|
|
129
129
|
func! s:follow_link_under_cursor(split)
|
130
|
-
|
131
|
-
|
132
|
-
silent wincmd p
|
133
|
-
echom "Switched to last accessed window"
|
134
|
-
return
|
135
|
-
endif
|
136
|
-
if match(expand("<cWORD>>"), s:http_link_pattern) != -1
|
130
|
+
let word = expand("<cWORD>")
|
131
|
+
if match(word, s:http_link_pattern) != -1
|
137
132
|
call s:open_href_under_cursor()
|
138
133
|
return
|
139
134
|
endif
|
140
135
|
let link = s:link_under_cursor()
|
141
136
|
if link == ""
|
142
|
-
|
137
|
+
" just switch windows
|
138
|
+
silent wincmd p
|
139
|
+
echom "'" . word . "' is not a wiki link. " . (winnr('$') > 1 ? "Switched to last accessed window." : "")
|
143
140
|
return ""
|
144
141
|
elseif line('.') == 1
|
145
142
|
" SPECIAL CASE
|