preciouschicken / vim-groff-viewer Goto Github PK
View Code? Open in Web Editor NEWA vim plugin for displaying Groff files in a document viewer.
Home Page: https://preciouschicken.com/software/vim-groff-viewer/
License: Apache License 2.0
A vim plugin for displaying Groff files in a document viewer.
Home Page: https://preciouschicken.com/software/vim-groff-viewer/
License: Apache License 2.0
If the path has a space in the directory (and possibly the file name?) a blank file is generated and the viewer fails.
Create a groff document within a directory containing a space, e.g.
/home/gene/Dropbox/test bed/complaint.me
and run vim-groff-viewer open file command.
vim-groff-viewer should create postscript file, not a blank file, regardless of spaces.
N/A
Manjaro Linux 21.3.7
GNU groff version 1.22.4
NVIM v0.7.2
N/A
Allow viewing of man pages (kind of groffer replacement):
Extension of neovim :Man
functionality?
Would grog work better in the SaveTempPS() function than groff if no options are provided by user? Currently the plugin guesses the macro from the file extension, any other options have to be added by the user.
Print option is wrongly hardcoded to me macro.
Print using a macro other than me.
Should print all macros.
N/A
Manjaro Linux 21.3.7
GNU groff version 1.22.4
NVIM v0.7.2
N/A
Using the :sb
command to split a buffer between a groff (e.g. .me) and non-groff (e.g. .txt) file causes an error message on write:
Error detected while processing function <SNR>58_SaveTempPS:
line 4:
E121: Undefined variable: b:tempName
Non-groff file does write correctly however.
Split buffer on groff and non-groff file and :w
non-groff file.
No error message.
N/A
Manjaro Linux 21.3.7
GNU groff version 1.22.4
NVIM v0.7.2
N/A
Replace <leader>
with <localeader>
because:
It's even more important when you're writing a plugin for other people to use. The convention of using for local mappings will prevent your plugin from overwriting someone else's mapping that they've painstakingly burned into their fingers over time.
See example of FileType Events from Learn Vimscript the Hard Way.
Describe the issue
The key mappings (e.g. <localleader>o
to open viewer) are enabled in buffers which have a filetype other than nroff when you also have a nroff buffer loaded.
To Reproduce
nvim complaint.me hw.ms index.html
:b index
<localleader>o
Expected behaviour
Mapping should not work in open buffers other than filetype=nroff
Desktop (please complete the following information):
Describe the issue
Wordcount functionality (<localleader>wc
) overcounts words (slightly).
Expected behaviour
Accurate wordcount.
Desktop (please complete the following information):
Additional context
Rather than counting words for lines beginning with 't' instead count word spaces ('wh'?) and then plus one for ultimate word? Former method occasionally splits words. Read man 5 groff_out again. Emulate as far as possible how GNU wc functions.
New remap to print out word count using a command similar to:
groff -me complaint.me | ps2ascii | wc -w
Describe the issue
When calling \wc
function on the sample_docs.mom document neovim freezes.
To Reproduce
Steps to reproduce the behaviour:
\wc
Expected behavior
Produces wordcount.
Screenshots
Nil
Desktop (please complete the following information):
Additional context
Is this a mom only issue? Or possibly caused by length of file?
Describe the issue
Filetype plugin not recognised on Neovim (v0.9.1), i.e. none of the mappings work. Continues to work on vim.
To Reproduce
<leader>o
Neovim will enter insert mode and not open viewer - as if plugin was not there.
Expected behavior
Viewer to open.
Screenshots
N/A
Desktop (please complete the following information):
Additional context
This is almost certainly an issue with the disabling option code:
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
If the variable name is changed then it will work in both vim and neovim. Does neovim think a plugin for this filetype has already been activated (i.e. b:did_ftplugin= 1) and therefore this plugin is disabled? However running echo b:did_ftplugin
gives a value of 1 on both vim and neovim when running with --clean
flag - why therefore is vim not disabling this plugin and neovim is? Fix is to change the variable name, which does not seem to have any negative consequences, but unsure why neovim is now behaving this way. May submit an issue with neovim - but need to determine exactly what problem is first.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.