-
Notifications
You must be signed in to change notification settings - Fork 1
/
smile.txt
60 lines (41 loc) · 2.28 KB
/
smile.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
*smile.txt* the power of |:smile| available to everyone
Author: Idan Arye <https://github.com/idanarye/>
License: Same terms as Vim itself (see |license|)
Version: 1.0.1
INTRODUCTION *smile*
Vim 8's most anticipated feature is undoubtedly the |:smile| command. This
command increases the happiness of Vim users, and by doing so increases their
productivity.
However, not everyone can enjoy this new functionality. Some developers are
stuck with old Linux distributions that have old Vim builds, and can't upgrade
to Vim 8. Others use Neovim, which heartlessly refuses to port the `:smile`
command.
This plugin implements the |:smile| command in Vimscript, so that everyone can
enjoy it. It also extends the mechanism to allow plugin authors to create their
own smiles.
If you are able to use a recent Vim build that supports |:smile| you should
prefer the native implementation as it is more performant.
USAGE *smile-usage*
Use the *:Smile* command to show a smile and increase your happiness. Use
":Smile type-of-smile" to show a specific smile. ":Smile smile" is the same
as ":Smile".
CREATE YOUR OWN SMILES *smile-create-your-own*
To create your own smile, create in one of the directories listed in
|'runtimepath'| a directory named "autoload/smile/resource/"(if it does not
already exist), and put in their a file with the ".sml" extension. The file
format is as follows:
- First line - the name of the default highlight group. This will be the
highlight group of all characters that don't have a special highlight group
specified.
- A list of special hightlight groups. Each line will consist of a highlight
group name, a single space, and a list of unseparated characters. These
characters will be highlight with that highlight group. Take care to not
separate the characters with commas or spaces or anything. or the
separator character will also be highlighted.
- A blank line. This marks the end of the header.
- The ASCII art of the smile itself.
To use your smile, run |:Smile| with the name of the file minus the extension
as the argument.
For example, if your file is "autoload/smile/resource/hello.sml", run: >
:Smile hello
>