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 is a really stripped down and simple version of | |
-- Daniel Shockley's DocInfo, which I had trouble getting | |
-- to work on pandoc converted unicode files. | |
-- Thanks to him for the original script: | |
-- DocInfo (for Skim) | |
-- version 1.0, Daniel A. Shockley, http://www.danshockley.com | |
-- http://www.danshockley.com/files/DocInfo.scpt | |
tell application "Skim" | |
set docName to name of document 1 |
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
function! WC() | |
if getline(1) != '' | |
if &modified || !exists("b:wordcount") | |
let l:old_status = v:statusmsg | |
let position = getpos(".") | |
execute "silent normal g\<c-g>" | |
let b:wordcount = str2nr(split(v:statusmsg)[11]) | |
let v:statusmsg = l:old_status | |
call setpos('.', position) | |
return b:wordcount |
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
(* | |
Copyright 2009 Konrad M. Lawson | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
NewerOlder