soywiki 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +6 -4
- data/bin/soywiki-rename +2 -2
- data/lib/soywiki.rb +1 -1
- metadata +2 -2
data/README.markdown
CHANGED
@@ -222,11 +222,13 @@ or `,O` (capital O). All these commands open the webpage inside your Vim
|
|
222
222
|
session using `elinks` or whatever browser you set as your
|
223
223
|
`g:netrw_http_cmd`. See `:help netrw` for more information.
|
224
224
|
|
225
|
-
|
225
|
+
TIP: I personally prefer using `netrw` (configured to use elinks) to
|
226
226
|
launching URLs in an external web browser. This lets me keep all my URL
|
227
227
|
bookmarks in regular text files and open, clip, and annotate them all in
|
228
228
|
SoyWiki and Vim. Using `netrw` helps your text editor rather than your
|
229
|
-
web browser dominate your workflow.
|
229
|
+
web browser dominate your workflow. And you tend to stay focused on
|
230
|
+
your task rather than going down the rabbit hole off internet
|
231
|
+
distractions.
|
230
232
|
|
231
233
|
|
232
234
|
## WikiLink autocompletion
|
@@ -255,7 +257,7 @@ page. The form of the argument here should be `namespace/WikiWord`. You
|
|
255
257
|
may use command line file path autocomplete to fill out the namespace
|
256
258
|
subdirectory if it already exists.
|
257
259
|
|
258
|
-
|
260
|
+
TIP: I recommend not using :SWCreate to create wiki pages. Prefer the
|
259
261
|
method of writing a WikiLink and then traversing it. This will make your
|
260
262
|
wiki more interlinked, better organized, and easier to traverse in an
|
261
263
|
organic way.
|
@@ -326,7 +328,7 @@ Under the hood, `:SWSearch` is just a thin wrapper around the `:vimgrep`
|
|
326
328
|
command. Use `:vimgrep` directly if you want to do anything more
|
327
329
|
specific.
|
328
330
|
|
329
|
-
|
331
|
+
TIP: You can flag important notes in your wiki content by typing flags
|
330
332
|
like TODO or IMPORTANT! on the same line, and then use `:SWSearch` and
|
331
333
|
`:cl` to see all instances of them across your entire wiki.
|
332
334
|
|
data/bin/soywiki-rename
CHANGED
@@ -29,11 +29,11 @@ end
|
|
29
29
|
|
30
30
|
def change_unqualified_inbound_links_in_same_namespace(oldname, newname)
|
31
31
|
MEMO << "- Updating unqualified inbound links"
|
32
|
-
target_files = `grep -rlF '
|
32
|
+
target_files = `grep -rlF '#{oldname.short_page_title}' #{oldname.namespace}/*`.strip.split(/\n/)
|
33
33
|
target_files.select {|f| f !~ /(\.swp|\.swo)$/}.each do |file|
|
34
34
|
text = File.read(file)
|
35
35
|
begin
|
36
|
-
text = text.gsub(/(\A|\s)#{oldname.short_page_title}\b/,
|
36
|
+
text = text.gsub(/(\A|\s)#{oldname.short_page_title}\b/, newname.to_page_title)
|
37
37
|
File.open(file, 'w') {|f| f.puts text}
|
38
38
|
report file, oldname.short_page_title, newname
|
39
39
|
rescue
|
data/lib/soywiki.rb
CHANGED