Skip to content

Commit 3a6be4f

Browse files
committed
[ADD] Adding readme file and documentation file. Initializing the
plugin.
1 parent 997befa commit 3a6be4f

File tree

3 files changed

+376
-0
lines changed

3 files changed

+376
-0
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# swap
2+
[._]*.s[a-v][a-z]
3+
[._]*.sw[a-p]
4+
[._]s[a-v][a-z]
5+
[._]sw[a-p]
6+
# session
7+
Session.vim
8+
# temporary
9+
.netrwhist
10+
*~
11+
# auto-generated tag files
12+
tags

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## Description
2+
3+
This is helpfile for [goyo.vim][goyo] plugin. The plugin [goyo.vim][goyo] helps
4+
writer to focus on their writing while they are writing. This plugin only
5+
contains a helpfile. For using the [goyo.vim] plugin, you have to install that
6+
plugin. The native plugin does not contain any kind of vim specific helpfile.
7+
Installing this plugin will allow you to play with the helpfile in your vim
8+
editor.
9+
10+
### How to install?
11+
12+
You can use any of automated plugin installer such as
13+
[vim-pathogen](https://github.com/tpope/vim-pathogen),
14+
[Vundle](https://github.com/VundleVim/Vundle.vim) etc.
15+
16+
### How to use?
17+
18+
```
19+
:help goyo_doc.txt
20+
```
21+
22+
## FAQ
23+
24+
### Why to create new plugin for just helpfile?
25+
26+
Reading description of this Github
27+
[issue](https://github.com/junegunn/goyo.vim/issues/144) will answer your this
28+
question.
29+
30+
[goyo]: http://github.com/junegunn/goyo.vim

doc/goyo_doc.txt

Lines changed: 334 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,334 @@
1+
*goyo_doc.txt* For Vim version 7.4 Last change: 2017 March 11
2+
3+
Reference Manual of goyo.vim plugin
4+
5+
==============================================================================
6+
CONTENTS *Goyo-contents*
7+
8+
1.Introduction............................|GoyoIntro|
9+
1.1.Screenshots.......................|GoyoScreenshots|
10+
2.Functionality provided..................|GoyoFunctionality|
11+
2.1.Global commands...................|GoyoCommands|
12+
2.2.Shortcuts.........................|GoyoCommandShortcuts|
13+
3.API of Goyo plugin......................|GoyoAPI|
14+
3.1.Goyo global commands..............|GoyoGlobalCommands|
15+
3.2.Goyo events.......................|GoyoEvents|
16+
3.3.Customization especially for GVim.|GoyoGVim|
17+
4.Other...................................|GoyoOther|
18+
4.1.Goyo Auto disabled vim plugins....|GoyoAutodisabledVimPlugins|
19+
4.2.Best compatible vim plugins.......|GoyoOtherVimPlugins|
20+
5.About...................................|GoyoAbout|
21+
6.License.................................|GoyoLicense|
22+
23+
==============================================================================
24+
1. Introduction ~
25+
*GoyoIntro*
26+
27+
The Goyo is designed for distraction free writing in vim. This plugin will help
28+
the writers to focus only on their writing while they are writing. The editor
29+
vim supports plugins and customizations largely. Such freedom adds various
30+
panels, windows to your window. It might be helpful to disable them while you
31+
are writing or programming a part of the code which requires extra
32+
concentration.
33+
34+
Disabling distracted plugins one by one might take long time added with some
35+
extra commands. If you are the hacker you will remap them to a single command
36+
but Goyo is here for solving your that problem. Writers are advisable to try
37+
this plugin and measure the improvements in their writing.
38+
39+
-------------------------------------------------------------------------------
40+
1.1 Screenshots *GoyoScreenshot*
41+
42+
Find Goyo screenshot at below URL:
43+
44+
https://raw.githubusercontent.com/junegunn/i/master/goyo.png
45+
46+
47+
==============================================================================
48+
2. Functionality provided ~
49+
*GoyoFunctionality*
50+
51+
52+
------------------------------------------------------------------------------
53+
2.1. Commands *GoyoCommands*
54+
55+
:Goyo *':Goyo'*
56+
57+
Above plugin will activate the Goyo plugin if it is called without any
58+
arguments.
59+
60+
Without any arguments: If this command is called without any arguments then
61+
it will activate the Goyo window. It fires |GoyoEnter| event.
62+
63+
*GoyoDimension*
64+
65+
:Goyo [WIDTH] [OFFSET-X] [xHEIGHT] [OFFSET-Y]:
66+
67+
When |:Goyo| is called with dimension argument it will turn the Goyo plugin
68+
on or resize existing window according to the given dimension arguments.
69+
The {OFFSET-X} and {OFFSET-Y} option requires + or - to identify the
70+
offset value.
71+
72+
Follow below guidelines to know more about various options with arguments.
73+
74+
Example: *GoyoWidth*
75+
>
76+
:Goyo 120
77+
<
78+
79+
Above example will activate or resize the Goyo window with the with of 120.
80+
81+
*GoyoHeight*
82+
>
83+
:Goyo x30
84+
<
85+
86+
Above example will activate or resize the Goyo window with the height of
87+
30% from overall window
88+
89+
*GoyoWidthHeight*
90+
>
91+
:Goyo 120x30
92+
<
93+
94+
It will activate or resize the Goyo window with the height of 30 and width
95+
of 120.
96+
97+
*GoyoWidthHeightPercentage*
98+
>
99+
:Goyo 120x50%
100+
<
101+
102+
Example will activate or resize the Goyo window with the height as
103+
percentage of 50 from overall and Width of 120.
104+
105+
*GoyoOffsetX*
106+
*GoyoOffsetY*
107+
>
108+
:Goyo 50%+25%x50%-25%
109+
<
110+
111+
Above will activate or resize the Goyo window with the width as 50% from
112+
overall and an offset for X axis of +25% and height with 50% from overall
113+
and -25% as an offset for the Y axis.
114+
115+
116+
:Goyo! *':Goyo!'*
117+
118+
Calling |:Goyo| with '!' argument will close the Goyo plugin.
119+
120+
121+
:q *GoyoExit*
122+
123+
When Goyo plugin is activated, calling ':q' will quit the Goyo plugin. It
124+
will work same as calling |:Goyo!|.
125+
126+
127+
--------------------------------------------------------------------------------
128+
2.2 Shortcuts *GoyoCommandShortcuts*
129+
130+
Commands described in section 2.1 |:Goyo| can be fired using below shortcut
131+
keys.
132+
133+
134+
[count] <CTRL-W> > *CTRL-W_>*
135+
136+
Increase width of the present Goyo window.
137+
138+
[count] <CTRL-W> < *CTRL-W_<*
139+
140+
Decrease width of the present Goyo window.
141+
142+
[count] <CTRL-W> + *CTRL-W_+*
143+
144+
Increase the height of the present Goyo window.
145+
146+
[count] <CTRL-W> - *CTRL-W_-*
147+
148+
Decrease the height of the present Goyo window.
149+
150+
151+
==============================================================================
152+
3. API of Goyo plugin ~
153+
*GoyoAPI*
154+
155+
goyo.vim provides global commands and various events for getting nice control
156+
over the plugin.
157+
158+
------------------------------------------------------------------------------
159+
3.1 Goyo global commands *GoyoGlobalCommands*
160+
161+
Goyo plugin provides below configuration options.
162+
163+
*'g:goyo_width'*
164+
>
165+
g:goyo_width
166+
<
167+
168+
The |goyo_width| option is used to set the text width when the goyo plugin is
169+
activated. By default, this value is 80.
170+
171+
*'g:goyo_height'*
172+
>
173+
g:goyo_height
174+
<
175+
176+
The |goyo_height| option is used to set the hight of the view port when the
177+
plugin is activated. By default, the value is 85%.
178+
179+
*'g:goyo_linenr'*
180+
>
181+
g:goyo_linenr
182+
<
183+
184+
The |goyo_linenr| is for showing line numbers when goyo plugin is active. The
185+
default value is 0. Setting it to 1 will show the line numbers when the goyo
186+
plugin is active.
187+
188+
-------------------------------------------------------------------------------
189+
3.2 Goyo events *GoyoEvents*
190+
191+
See |GoyoAutodisabledVimPlugins| section to discover which plugins are
192+
automatically disabled when Goyo plugin is activated.
193+
194+
Changing behavior like enabling/disabling other plugins for Goyo mode is done
195+
by executing custom functions on |GoyoEnter| or |GoyoLeave| event.
196+
197+
198+
GoyoEnter *GoyoEnter*
199+
200+
|GoyoEnter| event is fired at the time of loading the plugin. You can use
201+
this event to enable/disable other plugins or if you want to change the
202+
default settings of the Goyo window. You can set up custom routines to be
203+
triggered by this event.
204+
205+
Example:
206+
>
207+
function! s:goyo_enter()
208+
silent !tmux set status off
209+
silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z
210+
set noshowmode
211+
set noshowcmd
212+
set scrolloff=999
213+
Limelight
214+
" ...
215+
endfunction
216+
<
217+
218+
Above custom function can be triggered while putting listener on |GoyoEnter|
219+
event with the below configuration.
220+
221+
>
222+
223+
autocmd! User GoyoEnter nested call <SID>goyo_enter()
224+
225+
<
226+
227+
GoyoLeave *GoyoLeave*
228+
229+
|GoyoLeave| event is fired at the time when Goyo plugin is leaving the Goyo
230+
mode. You can use this event to do customization of enabling/disabling other
231+
plugins or if you want to change the default settings of the Goyo window. You
232+
can set up custom routines to be triggered by this event.
233+
234+
Example:
235+
>
236+
function! s:goyo_leave()
237+
silent !tmux set status on
238+
silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z
239+
set showmode
240+
set showcmd
241+
set scrolloff=5
242+
Limelight!
243+
" ...
244+
endfunction
245+
<
246+
247+
Above custom function can be triggered while putting listners on GoyoEnter
248+
event with below configuration.
249+
250+
>
251+
autocmd! User GoyoLeave nested call <SID>goyo_leave()
252+
<
253+
254+
------------------------------------------------------------------------------
255+
3.3 Customization especially for GVim. *GoyoGVim*
256+
257+
The below is the example for configuring Gvim specific customization using Gvim
258+
API.
259+
260+
>
261+
function! s:goyo_enter()
262+
if has('gui_running')
263+
set fullscreen
264+
set background=light
265+
set linespace=7
266+
elseif exists('$TMUX')
267+
silent !tmux set status off
268+
endif
269+
endfunction
270+
271+
function! s:goyo_leave()
272+
if has('gui_running')
273+
set nofullscreen
274+
set background=dark
275+
set linespace=0
276+
elseif exists('$TMUX')
277+
silent !tmux set status on
278+
endif
279+
endfunction
280+
281+
autocmd! User GoyoEnter nested call <SID>goyo_enter()
282+
autocmd! User GoyoLeave nested call <SID>goyo_leave()
283+
<
284+
285+
286+
==============================================================================
287+
4. Other ~
288+
*GoyoOther*
289+
290+
291+
------------------------------------------------------------------------------
292+
4.1 Goyo Auto disabled vim plugins *GoyoAutodisabledVimPlugins*
293+
294+
By default, below vim plugins are disabled temporarily when the Goyo plugin is
295+
activated.
296+
297+
* [vim-airline](https://github.com/bling/vim-airline)
298+
* [vim-powerline](https://github.com/Lokaltog/vim-powerline)
299+
* [powerline](https://github.com/Lokaltog/powerline)
300+
* [lightline.vim](https://github.com/itchyny/lightline.vim)
301+
* [vim-signify](https://github.com/mhinz/vim-signify)
302+
* [vim-gitgutter](https://github.com/airblade/vim-gitgutter)
303+
304+
305+
-------------------------------------------------------------------------------
306+
4.2 Best compatible vim plugins *GoyoOtherVimPlugins*
307+
308+
* Limelight: The plugin is best served with another vim plugin Limelight
309+
(https://github.com/junegunn/limelight.vim)
310+
311+
312+
==============================================================================
313+
5. About ~
314+
*GoyoAbout*
315+
316+
The goyo.vim is fork of the origin plugin with the same name created by
317+
Junegunn Choi (https://github.com/junegunn) at
318+
https://github.com/junegunn/goyo.vim
319+
320+
What is the reason for forking?
321+
322+
The fork is especially for adding the vim help file. The documentation is
323+
authored by Jaysinh Shukla (https://github.com/ultimatecoder). For more
324+
information have look to this Github issue
325+
https://github.com/junegunn/goyo.vim/issues/144
326+
327+
==============================================================================
328+
6. License ~
329+
*GoyoLicense*
330+
331+
The goyo.vim is released under the MIT licence.
332+
333+
This vim helpfile is released under GPL-v3.
334+
https://github.com/ultimatecoder/goyo-doc/blob/master/LICENSE

0 commit comments

Comments
 (0)