Compare commits
197 Commits
Author | SHA1 | Date |
---|---|---|
Шашкин Николай | ffee284fbc | |
Шашкин Николай | 0f955fe21f | |
Шашкин Николай | 52affeaee8 | |
Шашкин Николай | 9fe6b9c6a7 | |
Шашкин Николай | e739dd46b8 | |
Шашкин Николай | 1f56ccc8e2 | |
Шашкин Николай | fb7a1ce6f7 | |
Шашкин Николай | 6a0e026c63 | |
Шашкин Николай | 9bc4e1a098 | |
Шашкин Николай | 7a20676ac2 | |
Шашкин Николай | dbe67493c2 | |
Шашкин Николай | de4de65715 | |
Шашкин Николай | 031cc385ac | |
Kolan Sh | 71377a1c6d | |
Kolan Sh | dd61d20960 | |
Kolan Sh | 85615f89a3 | |
Kolan Sh | 2483881bd7 | |
Kolan Sh | f8669f0c66 | |
Kolan Sh | e4a8d2c3ef | |
Kolan Sh | b9008eefb2 | |
Kolan Sh | 66848f4998 | |
Kolan Sh | e6b65d02a8 | |
Kolan Sh | cfa39ab983 | |
Kolan Sh | 6007bcf62f | |
Kolan Sh | d250fe467d | |
Kolan Sh | f145627f93 | |
Kolan Sh | ddc6bb04b4 | |
Kolan Sh | 0417f9f05c | |
Kolan Sh | bc2ab613e6 | |
Kolan Sh | b91f146e47 | |
Kolan Sh | bd0b396eeb | |
Kolan Sh | 91e4049266 | |
Kolan Sh | 3c6bc122a1 | |
Kolan Sh | 91cfb005e0 | |
Kolan Sh | b9af6222f1 | |
Kolan Sh | 6e92c39edf | |
Kolan Sh | 1d514c7bd1 | |
Kolan Sh | 9f46d053ce | |
Kolan Sh | 0a9616200d | |
Kolan Sh | 82e1480b18 | |
Kolan Sh | b461ad5627 | |
Kolan Sh | 4847961a61 | |
Kolan Sh | 46c2db1807 | |
Kolan Sh | 755bb5b060 | |
Kolan Sh | 7566d7aa6f | |
Kolan Sh | a5ddc3da09 | |
Kolan Sh | db4a068577 | |
Kolan Sh | ee006dde18 | |
Kolan Sh | a513bfd8f6 | |
Kolan Sh | 9b3864ce33 | |
Kolan Sh | 8814f4de39 | |
Kolan Sh | 6171c9176c | |
Kolan Sh | effdbcd694 | |
Kolan Sh | 4af3b8822e | |
Kolan Sh | 63f9b60d09 | |
Kolan Sh | e8e0b8844b | |
Kolan Sh | e7c2836cec | |
Kolan Sh | 0dc0d0d634 | |
Kolan Sh | c233c7513a | |
Kolan Sh | 989d90a3ab | |
Kolan Sh | 2f8089b43b | |
Kolan Sh | fb11fbe4c9 | |
Kolan Sh | c65f1029f5 | |
Kolan Sh | 49fe66c32d | |
Kolan Sh | f31756d982 | |
Kolan Sh | 2cb997e0ca | |
Kolan Sh | 5a736a30f9 | |
Kolan Sh | ff184e89c6 | |
Kolan Sh | a5d32e785d | |
Kolan Sh | 260993624f | |
Kolan Sh | f40594c2cc | |
Kolan Sh | 0e7ebaef03 | |
Kolan Sh | 774432d47b | |
Kolan Sh | 635aa1f3b1 | |
Kolan Sh | 4b4fce4494 | |
Kolan Sh | be438bfec3 | |
Kolan Sh | 92acca5575 | |
Kolan Sh | 915daeb626 | |
Kolan Sh | 622e9d7531 | |
Kolan Sh | 162b4490a4 | |
Kolan Sh | be3cd35712 | |
Kolan Sh | b3d46e93bf | |
Kolan Sh | 4abfe55278 | |
Kolan Sh | d4bd05f2d9 | |
Kolan Sh | b8764f4050 | |
Kolan Sh | 9882fa5f89 | |
Kolan Sh | 7b9aa82d33 | |
Kolan Sh | cd6ccd175a | |
Kolan Sh | bbd564c126 | |
Kolan Sh | e6203433ae | |
Kolan Sh | 19c356883c | |
Kolan Sh | a6968146cf | |
Kolan Sh | a8fe971ed4 | |
Kolan Sh | f2db42bed4 | |
Kolan Sh | 1d3f01a1e5 | |
Kolan Sh | 2497f0995a | |
Kolan Sh | 3b14041185 | |
Kolan Sh | 03a830cd52 | |
Kolan Sh | d208dc055b | |
Kolan Sh | d390265394 | |
Kolan Sh | 2766df4be3 | |
Kolan Sh | 00788aecaf | |
Kolan Sh | 868c36140a | |
Kolan Sh | ea9f832f14 | |
Kolan Sh | 8bd9d08ba9 | |
Kolan Sh | 1549eda1ba | |
Kolan Sh | 0b629b5344 | |
Kolan Sh | 2872923c2a | |
Kolan Sh | 8ff3fd6502 | |
Kolan Sh | 7c6674c33c | |
Kolan Sh | 8f494006ac | |
Kolan Sh | 741d1c378d | |
Kolan Sh | a0d6e4479a | |
Kolan Sh | 2bfcead90f | |
Kolan Sh | a7ab079326 | |
Kolan Sh | cfcc27612e | |
Kolan Sh | d980d5a0bd | |
Kolan Sh | 62f9f6ea57 | |
Kolan Sh | 78b7b3e8de | |
Kolan Sh | 81a50e8c1d | |
Kolan Sh | 5cba26b8e1 | |
Kolan Sh | be1e074ddc | |
Kolan Sh | 2620497bb5 | |
Kolan Sh | 20e522bdf5 | |
Kolan Sh | c7b9ca0c56 | |
Kolan Sh | 8c147f5c95 | |
Kolan Sh | 45f2f4fe84 | |
Kolan Sh | bd5fc24a5c | |
Kolan Sh | 12b2ceb9f2 | |
Kolan Sh | 3f408128fd | |
Kolan Sh | e19a772ece | |
Kolan Sh | b3d72e480c | |
Kolan Sh | 2c0b65b6b8 | |
Kolan Sh | 73d71dc8c8 | |
Kolan Sh | 7d7a2cfe93 | |
Kolan Sh | 0a95dacc94 | |
Kolan Sh | 150323a6dd | |
Kolan Sh | 9c632f6c0f | |
Kolan Sh | cc16f5e8a9 | |
Kolan Sh | 47a78885cc | |
Kolan Sh | 0fd6f4b44d | |
Kolan Sh | 2b18421488 | |
Kolan Sh | a57064494c | |
Kolan Sh | 8f8b125903 | |
Kolan Sh | a0a9afd00b | |
Kolan Sh | 51408f76e3 | |
Kolan Sh | 5d74e4c625 | |
Kolan Sh | c611b6d4ab | |
Kolan Sh | 617307229d | |
Kolan Sh | d47499960b | |
Kolan Sh | ff8e17ea6b | |
Kolan Sh | 83cba39ea6 | |
Kolan Sh | e231b5f3a1 | |
Kolan Sh | 7830a3fbae | |
Kolan Sh | be7b3fdd49 | |
Kolan Sh | ab334bb34f | |
Kolan Sh | 4287d70895 | |
Kolan Sh | 8f20345e05 | |
Kolan Sh | 19c3492a6f | |
Kolan Sh | 12186b573b | |
Kolan Sh | 089f43f4c7 | |
Kolan Sh | 22cbc60cbc | |
Kolan Sh | 59a4a156b0 | |
Kolan Sh | 8893d61654 | |
Kolan Sh | 62ca0d2f99 | |
Kolan Sh | fa62459d25 | |
Kolan Sh | c038fe1909 | |
Kolan Sh | d8a56d381e | |
Kolan Sh | 4f1079cb4a | |
Kolan Sh | c03d0cc5a3 | |
Kolan Sh | 5252fc0b13 | |
Kolan Sh | 98ee157bab | |
Kolan Sh | 2b5ff458a3 | |
Kolan Sh | da320771d4 | |
Kolan Sh | 634e5ccc53 | |
Kolan Sh | f5d67b412b | |
Kolan Sh | 72fba07948 | |
Kolan Sh | 07cc143a00 | |
Kolan Sh | 12524a128c | |
Kolan Sh | f5ca74e068 | |
Kolan Sh | 86aeb897d6 | |
Kolan Sh | 4383114911 | |
Kolan Sh | c51d141c4d | |
Kolan Sh | 331eed6fa4 | |
Kolan Sh | f5624e316e | |
Kolan Sh | 8779d80524 | |
Kolan Sh | 037813b7a5 | |
Kolan Sh | 9b1a9c55b6 | |
Kolan Sh | 25dadade47 | |
Kolan Sh | 50bd27e9d3 | |
Kolan Sh | 5c6b062ee1 | |
Kolan Sh | c65839fa98 | |
Kolan Sh | c137bfafb0 | |
Kolan Sh | bc7c651fe5 | |
Kolan Sh | 7358304716 | |
Kolan Sh | 1a65621047 | |
Kolan Sh | ba2c7d83cb |
|
@ -0,0 +1,4 @@
|
||||||
|
#include ".urxvt/Xdefaults"
|
||||||
|
#include ".fonts/Xdefaults"
|
||||||
|
|
||||||
|
! Xcursor.theme: gentoo-silver
|
|
@ -0,0 +1,12 @@
|
||||||
|
-DDEBUG
|
||||||
|
-I/usr/lib64/clang/3.1/include
|
||||||
|
-I/usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4
|
||||||
|
-I/usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu
|
||||||
|
-I/usr/include/linux
|
||||||
|
-I/usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.3/include
|
||||||
|
-I/usr/include/glib-2.0
|
||||||
|
-I/usr/include/glib-2.0/glib
|
||||||
|
-I/usr/lib/glib-2.0/include
|
||||||
|
-I/usr/include/glib-2.0/gio
|
||||||
|
-I/usr/include/glib-2.0/gobject
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
[ui_files]
|
||||||
|
0=/usr/share/lyx/ui/default.ui
|
||||||
|
0\date=@Variant(\0\0\0\x10\0%x\xcd\x3j_\xd8\x1)
|
||||||
|
|
||||||
|
[views]
|
||||||
|
0\pos=@Point(3 30)
|
||||||
|
0\size=@Size(1672 998)
|
||||||
|
0\layout=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x2\0\0\0\0\0\0\0\0\0\0\0\0\xfc\x2\0\0\0\x1\xfb\0\0\0\x6\0t\0o\0\x63\0\0\0\0\0\xff\xff\xff\xff\0\0\x1[\0\xff\xff\xff\0\0\0\x3\0\0\0\0\0\0\0\0\xfc\x1\0\0\0\x1\xfb\0\0\0\x16\0v\0i\0\x65\0w\0-\0s\0o\0u\0r\0\x63\0\x65\0\0\0\0\0\xff\xff\xff\xff\0\0\x1\xb6\0\xff\xff\xff\0\0\x6\x88\0\0\x3\xa0\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1d\0\0\0\x2\0\0\0\x3\0\0\0\x10\0s\0t\0\x61\0n\0\x64\0\x61\0r\0\x64\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\n\0\x65\0x\0t\0r\0\x61\x1\0\0\x2s\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x16\0v\0i\0\x65\0w\0/\0u\0p\0\x64\0\x61\0t\0\x65\x1\0\0\x4\xfb\0\0\0P\0\0\0\0\0\0\0\0\0\0\0\x2\0\0\0\0\0\0\0\x2\0\0\0\x1\0\0\0\f\0r\0\x65\0v\0i\0\x65\0w\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x2\0\0\0\0\0\0\0\x2\0\0\0\x1\0\0\0\x6\0v\0\x63\0s\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\n\0t\0\x61\0\x62\0l\0\x65\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\b\0m\0\x61\0t\0h\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\"\0m\0\x61\0t\0h\0m\0\x61\0\x63\0r\0o\0t\0\x65\0m\0p\0l\0\x61\0t\0\x65\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x14\0m\0i\0n\0i\0\x62\0u\0\x66\0\x66\0\x65\0r\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x16\0m\0\x61\0t\0h\0_\0p\0\x61\0n\0\x65\0l\0s\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x12\0\x66\0u\0n\0\x63\0t\0i\0o\0n\0s\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\n\0s\0p\0\x61\0\x63\0\x65\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x16\0s\0q\0r\0t\0-\0s\0q\0u\0\x61\0r\0\x65\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\n\0s\0t\0y\0l\0\x65\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x16\0\x66\0r\0\x61\0\x63\0-\0s\0q\0u\0\x61\0r\0\x65\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\b\0\x66\0o\0n\0t\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x14\0l\0\x61\0t\0\x65\0x\0_\0\x64\0o\0t\0s\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x14\0l\0\x61\0t\0\x65\0x\0_\0\x64\0\x65\0\x63\0o\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x16\0l\0\x61\0t\0\x65\0x\0_\0\x61\0r\0r\0o\0w\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x12\0l\0\x61\0t\0\x65\0x\0_\0\x62\0o\0p\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x14\0l\0\x61\0t\0\x65\0x\0_\0\x62\0r\0\x65\0l\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x16\0l\0\x61\0t\0\x65\0x\0_\0g\0r\0\x65\0\x65\0k\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x14\0l\0\x61\0t\0\x65\0x\0_\0m\0i\0s\0\x63\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x16\0l\0\x61\0t\0\x65\0x\0_\0v\0\x61\0r\0s\0z\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x1c\0l\0\x61\0t\0\x65\0x\0_\0\x61\0m\0s\0_\0m\0i\0s\0\x63\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0 \0l\0\x61\0t\0\x65\0x\0_\0\x61\0m\0s\0_\0\x61\0r\0r\0o\0w\0s\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x1a\0l\0\x61\0t\0\x65\0x\0_\0\x61\0m\0s\0_\0r\0\x65\0l\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x1c\0l\0\x61\0t\0\x65\0x\0_\0\x61\0m\0s\0_\0n\0r\0\x65\0l\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x1a\0l\0\x61\0t\0\x65\0x\0_\0\x61\0m\0s\0_\0o\0p\0s\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0)
|
||||||
|
0\icon_size=@Size(14 14)
|
||||||
|
0\extra\visibility=5
|
||||||
|
0\font\visibility=10
|
||||||
|
0\frac-square\visibility=10
|
||||||
|
0\functions\visibility=10
|
||||||
|
0\latex_ams_arrows\visibility=10
|
||||||
|
0\latex_ams_misc\visibility=10
|
||||||
|
0\latex_ams_nrel\visibility=10
|
||||||
|
0\latex_ams_ops\visibility=10
|
||||||
|
0\latex_ams_rel\visibility=10
|
||||||
|
0\latex_arrow\visibility=10
|
||||||
|
0\latex_bop\visibility=10
|
||||||
|
0\latex_brel\visibility=10
|
||||||
|
0\latex_deco\visibility=10
|
||||||
|
0\latex_dots\visibility=10
|
||||||
|
0\latex_greek\visibility=10
|
||||||
|
0\latex_misc\visibility=10
|
||||||
|
0\latex_varsz\visibility=10
|
||||||
|
0\math\visibility=200
|
||||||
|
0\math_panels\visibility=200
|
||||||
|
0\mathmacrotemplate\visibility=1096
|
||||||
|
0\minibuffer\visibility=10
|
||||||
|
0\review\visibility=580
|
||||||
|
0\space\visibility=10
|
||||||
|
0\sqrt-square\visibility=10
|
||||||
|
0\standard\visibility=5
|
||||||
|
0\style\visibility=10
|
||||||
|
0\table\visibility=328
|
||||||
|
0\vcs\visibility=6
|
||||||
|
0\view\update\visibility=5
|
||||||
|
0\aboutlyx\geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\x1\x2\0\0\0\xaa\0\0\x2J\0\0\x1\xd6\0\0\x1\x3\0\0\0\xbc\0\0\x2I\0\0\x1\xd5\0\0\0\0\0\0)
|
||||||
|
0\prefs\geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\xdd\0\0\0\x17\0\0\x3\xc7\0\0\x1\xf8\0\0\0\xde\0\0\0)\0\0\x3\xc6\0\0\x1\xf7\0\0\0\0\0\0)
|
||||||
|
0\toc\geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\xcf\0\0\x1Z\0\0\0\0\0\0\0\0\0\0\0\xcf\0\0\x1Z\0\0\0\0\0\0)
|
||||||
|
0\view-source\geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x1\xb5\0\0\0[\0\0\0\0\0\0\0\0\0\0\x1\xb5\0\0\0[\0\0\0\0\0\0)
|
||||||
|
0\view-source\fullsource=false
|
||||||
|
0\view-source\autoupdate=true
|
|
@ -0,0 +1,192 @@
|
||||||
|
|
||||||
|
[geany]
|
||||||
|
default_open_path=/home/kolan
|
||||||
|
cmdline_new_files=true
|
||||||
|
notebook_double_click_hides_widgets=false
|
||||||
|
tab_pos_sidebar=2
|
||||||
|
highlighting_invert_all=false
|
||||||
|
pref_main_suppress_search_dialogs=false
|
||||||
|
pref_main_search_use_current_word=true
|
||||||
|
check_detect_indent=false
|
||||||
|
use_tab_to_indent=true
|
||||||
|
pref_editor_tab_width=8
|
||||||
|
indent_hard_tab_width=8
|
||||||
|
indent_mode=2
|
||||||
|
indent_type=1
|
||||||
|
autocomplete_doc_words=false
|
||||||
|
completion_drops_rest_of_word=false
|
||||||
|
autocompletion_max_entries=30
|
||||||
|
mru_length=10
|
||||||
|
disk_check_timeout=30
|
||||||
|
show_editor_scrollbars=true
|
||||||
|
brace_match_ltgt=false
|
||||||
|
use_gtk_word_boundaries=true
|
||||||
|
complete_snippets_whilst_editing=false
|
||||||
|
show_symbol_list_expanders=true
|
||||||
|
allow_always_save=false
|
||||||
|
use_safe_file_saving=false
|
||||||
|
documents_show_paths=true
|
||||||
|
sidebar_page=2
|
||||||
|
pref_main_load_session=true
|
||||||
|
pref_main_project_session=true
|
||||||
|
pref_main_project_file_in_basedir=true
|
||||||
|
pref_main_save_winpos=true
|
||||||
|
pref_main_confirm_exit=false
|
||||||
|
pref_main_suppress_status_messages=false
|
||||||
|
switch_msgwin_pages=false
|
||||||
|
beep_on_errors=true
|
||||||
|
auto_focus=false
|
||||||
|
sidebar_symbol_visible=true
|
||||||
|
sidebar_openfiles_visible=true
|
||||||
|
editor_font=Liberation Mono 8
|
||||||
|
tagbar_font=Sans 8
|
||||||
|
msgwin_font=Sans 8
|
||||||
|
show_notebook_tabs=true
|
||||||
|
show_tab_cross=true
|
||||||
|
tab_order_ltr=true
|
||||||
|
tab_pos_editor=2
|
||||||
|
tab_pos_msgwin=0
|
||||||
|
show_indent_guide=false
|
||||||
|
show_white_space=false
|
||||||
|
show_line_endings=false
|
||||||
|
show_markers_margin=true
|
||||||
|
show_linenumber_margin=true
|
||||||
|
long_line_type=0
|
||||||
|
long_line_column=72
|
||||||
|
long_line_color=#C2EBC2
|
||||||
|
symbolcompletion_max_height=10
|
||||||
|
symbolcompletion_min_chars=4
|
||||||
|
use_folding=true
|
||||||
|
unfold_all_children=true
|
||||||
|
use_indicators=true
|
||||||
|
line_wrapping=true
|
||||||
|
auto_close_xml_tags=true
|
||||||
|
complete_snippets=true
|
||||||
|
auto_complete_symbols=true
|
||||||
|
pref_editor_disable_dnd=false
|
||||||
|
pref_editor_smart_home_key=true
|
||||||
|
pref_editor_newline_strip=true
|
||||||
|
line_break_column=72
|
||||||
|
auto_continue_multiline=true
|
||||||
|
comment_toggle_mark=~
|
||||||
|
scroll_stop_at_last_line=true
|
||||||
|
autoclose_chars=31
|
||||||
|
pref_editor_default_new_encoding=UTF-8
|
||||||
|
pref_editor_default_open_encoding=WINDOWS-1251
|
||||||
|
default_eol_character=2
|
||||||
|
pref_editor_new_line=true
|
||||||
|
pref_editor_replace_tabs=false
|
||||||
|
pref_editor_trail_space=true
|
||||||
|
pref_toolbar_show=true
|
||||||
|
pref_toolbar_append_to_menu=false
|
||||||
|
pref_toolbar_icon_style=0
|
||||||
|
pref_toolbar_icon_size=0
|
||||||
|
pref_template_developer=Kolan Sh.
|
||||||
|
pref_template_company=InSys Ltd
|
||||||
|
pref_template_mail=mecareful@gmail.com
|
||||||
|
pref_template_initial=SNS
|
||||||
|
pref_template_version=1.0
|
||||||
|
pref_template_year=%Y
|
||||||
|
pref_template_date=%Y-%m-%d
|
||||||
|
pref_template_datetime=%d.%m.%Y %H:%M:%S %Z
|
||||||
|
context_action_cmd=
|
||||||
|
sidebar_visible=true
|
||||||
|
statusbar_visible=true
|
||||||
|
msgwindow_visible=true
|
||||||
|
fullscreen=false
|
||||||
|
scribble_text=
|
||||||
|
scribble_pos=0
|
||||||
|
treeview_position=0
|
||||||
|
msgwindow_position=687
|
||||||
|
geometry=3;30;1672;968;0;
|
||||||
|
custom_date_format=
|
||||||
|
sidebar_pos=0
|
||||||
|
virtualspace=1
|
||||||
|
color_scheme=
|
||||||
|
compiler_tab_autoscroll=true
|
||||||
|
tab_order_beside=false
|
||||||
|
msgwin_status_visible=true
|
||||||
|
msgwin_compiler_visible=true
|
||||||
|
msgwin_messages_visible=true
|
||||||
|
msgwin_scribble_visible=true
|
||||||
|
use_native_windows_dialogs=false
|
||||||
|
long_line_enabled=true
|
||||||
|
pref_toolbar_use_gtk_default_style=false
|
||||||
|
pref_toolbar_use_gtk_default_icon=true
|
||||||
|
gio_unsafe_save_backup=false
|
||||||
|
find_selection_type=0
|
||||||
|
statusbar_template=
|
||||||
|
new_document_after_close=false
|
||||||
|
pref_editor_ensure_convert_line_endings=false
|
||||||
|
|
||||||
|
[search]
|
||||||
|
pref_search_current_file_dir=true
|
||||||
|
find_all_expanded=false
|
||||||
|
replace_all_expanded=true
|
||||||
|
fif_mode=0
|
||||||
|
fif_extra_options=
|
||||||
|
fif_case_sensitive=true
|
||||||
|
fif_match_whole_word=false
|
||||||
|
fif_invert_results=false
|
||||||
|
fif_recursive=false
|
||||||
|
fif_use_extra_options=false
|
||||||
|
position_find_x=90
|
||||||
|
position_find_y=386
|
||||||
|
position_replace_x=800
|
||||||
|
position_replace_y=464
|
||||||
|
position_fif_x=1154
|
||||||
|
position_fif_y=409
|
||||||
|
fif_regexp=false
|
||||||
|
fif_files=
|
||||||
|
fif_use_files=false
|
||||||
|
|
||||||
|
[plugins]
|
||||||
|
load_plugins=true
|
||||||
|
custom_plugin_path=/home/kolan/.geany/plugins
|
||||||
|
active_plugins=/usr/lib64/geany/codenav.so;/usr/lib64/geany/geanyextrasel.so;/usr/lib64/geany/geanylatex.so;/usr/lib64/geany/spellcheck.so;/usr/lib64/geany/treebrowser.so;/usr/lib64/geany/classbuilder.so;/usr/lib64/geany/saveactions.so;/usr/lib64/geany/addons.so;/usr/lib64/geany/splitwindow.so;/usr/lib64/geany/shiftcolumn.so;/usr/lib64/geany/htmlchars.so;/usr/lib64/geany/export.so;
|
||||||
|
|
||||||
|
[tools]
|
||||||
|
make_cmd=make
|
||||||
|
term_cmd=urxvt
|
||||||
|
browser_cmd=firefox
|
||||||
|
grep_cmd=grep
|
||||||
|
|
||||||
|
[printing]
|
||||||
|
print_cmd=
|
||||||
|
use_gtk_printing=true
|
||||||
|
print_line_numbers=true
|
||||||
|
print_page_numbers=true
|
||||||
|
print_page_header=true
|
||||||
|
page_header_basename=false
|
||||||
|
page_header_datefmt=%c
|
||||||
|
|
||||||
|
[VTE]
|
||||||
|
load_vte=true
|
||||||
|
emulation=xterm
|
||||||
|
font=Terminus 10
|
||||||
|
scroll_on_key=true
|
||||||
|
scroll_on_out=true
|
||||||
|
enable_bash_keys=false
|
||||||
|
ignore_menu_bar_accel=false
|
||||||
|
follow_path=true
|
||||||
|
run_in_vte=true
|
||||||
|
skip_run_script=false
|
||||||
|
cursor_blinks=true
|
||||||
|
scrollback_lines=500
|
||||||
|
shell=/bin/bash
|
||||||
|
colour_fore=#FFFFFF
|
||||||
|
colour_back=#000000
|
||||||
|
last_dir=/home/kolan/projects/dataserver
|
||||||
|
send_selection_unsafe=false
|
||||||
|
|
||||||
|
[project]
|
||||||
|
session_file=/home/kolan/projects/dataserver/dataserver.geany
|
||||||
|
project_file_path=/home/kolan/projects
|
||||||
|
|
||||||
|
[files]
|
||||||
|
recent_files=/home/kolan/projects/dataserver/netfuncs.h;/home/kolan/projects/dataserver/netfuncs.c;/home/kolan/projects/dataserver/mpool.h;/home/kolan/projects/dataserver/mpool.c;/home/kolan/projects/dataserver/xerror.c;/home/kolan/projects/dataserver/xerror.h;/home/kolan/projects/dataserver/xmalloc.h;/home/kolan/projects/dataserver/xmalloc.c;/home/kolan/dev/c/malloc_speed_test/pool_list.c;/home/kolan/projects/dataserver/dataserver.c;
|
||||||
|
recent_projects=/home/kolan/projects/dataserver/dataserver.geany;dataserver.geany;/home/kolan/Projects/cpp/sockets/sockets.geany;/home/kolan/Projects/cpp/multithreading/pthread_ex.geany;/home/kolan/Projects/c/tmp2/tmp2.geany;/home/kolan/Projects/c/tmp1/tmp1.geany;/home/kolan/Projects/CPP/hello/hello.geany;/home/kolan/Projects/CPP/multithreading/pthread_ex.geany;/home/kolan/Projects/C/hello/hello.geany;
|
||||||
|
current_page=0
|
||||||
|
FILE_NAME_0=6788;C;0;16;1;1;1;/home/kolan/projects/dataserver/dataserver.c;0
|
||||||
|
FILE_NAME_1=0;C;0;16;1;1;1;/home/kolan/projects/dataserver/dataserver.h;0
|
||||||
|
FILE_NAME_2=0;C;0;16;1;1;1;/home/kolan/projects/dataserver/echo-client.c;0
|
|
@ -0,0 +1,245 @@
|
||||||
|
#Keybindings for Geany
|
||||||
|
#The format looks like "<Control>a" or "<Shift><Alt>F1".
|
||||||
|
#But you can also change the keys in Geany's preferences dialog.
|
||||||
|
|
||||||
|
[Bindings]
|
||||||
|
menu_new=<Control>n
|
||||||
|
menu_open=<Control>o
|
||||||
|
menu_open_selected=<Shift><Control>o
|
||||||
|
menu_save=<Control>s
|
||||||
|
menu_saveas=
|
||||||
|
menu_saveall=<Shift><Control>s
|
||||||
|
menu_print=<Control>p
|
||||||
|
menu_close=<Control>w
|
||||||
|
menu_closeall=<Shift><Control>w
|
||||||
|
menu_reloadfile=<Control>r
|
||||||
|
project_properties=
|
||||||
|
menu_undo=<Control>z
|
||||||
|
menu_redo=<Control>y
|
||||||
|
edit_deleteline=<Control>k
|
||||||
|
edit_duplicateline=<Control>d
|
||||||
|
edit_transposeline=<Control>t
|
||||||
|
edit_scrolltoline=<Shift><Control>l
|
||||||
|
edit_scrolllineup=<Alt>Up
|
||||||
|
edit_scrolllinedown=<Alt>Down
|
||||||
|
edit_completesnippet=Tab
|
||||||
|
edit_suppresssnippetcompletion=
|
||||||
|
move_snippetnextcursor=
|
||||||
|
popup_contextaction=
|
||||||
|
edit_autocomplete=<Control>space
|
||||||
|
edit_calltip=<Shift><Control>space
|
||||||
|
edit_macrolist=<Control>Return
|
||||||
|
edit_deletelinetoend=<Shift><Control>Delete
|
||||||
|
menu_cut=<Control>x
|
||||||
|
menu_copy=<Control>c
|
||||||
|
menu_paste=<Control>v
|
||||||
|
edit_cutline=<Shift><Control>x
|
||||||
|
edit_copyline=<Shift><Control>c
|
||||||
|
menu_selectall=<Control>a
|
||||||
|
edit_selectword=<Shift><Alt>w
|
||||||
|
edit_selectline=<Shift><Alt>l
|
||||||
|
edit_selectparagraph=<Shift><Alt>p
|
||||||
|
edit_togglecase=<Control><Alt>u
|
||||||
|
edit_commentlinetoggle=<Control>e
|
||||||
|
edit_commentline=
|
||||||
|
edit_uncommentline=
|
||||||
|
edit_increaseindent=<Control>i
|
||||||
|
edit_decreaseindent=<Control>u
|
||||||
|
edit_increaseindentbyspace=
|
||||||
|
edit_decreaseindentbyspace=
|
||||||
|
edit_autoindent=
|
||||||
|
edit_sendtocmd1=<Control>1
|
||||||
|
edit_sendtocmd2=<Control>2
|
||||||
|
edit_sendtocmd3=<Control>3
|
||||||
|
edit_sendtovte=
|
||||||
|
format_reflowparagraph=<Control>j
|
||||||
|
menu_insert_date=<Shift><Alt>d
|
||||||
|
edit_insertwhitespace=
|
||||||
|
menu_preferences=<Control><Alt>p
|
||||||
|
menu_find=<Control>f
|
||||||
|
menu_findnext=<Control>g
|
||||||
|
menu_findprevious=<Shift><Control>g
|
||||||
|
menu_findinfiles=<Shift><Control>f
|
||||||
|
menu_replace=<Control>h
|
||||||
|
menu_findnextsel=
|
||||||
|
menu_findprevsel=
|
||||||
|
menu_nextmessage=
|
||||||
|
menu_previousmessage=
|
||||||
|
popup_findusage=
|
||||||
|
popup_finddocumentusage=
|
||||||
|
find_markall=<Shift><Control>m
|
||||||
|
nav_forward=
|
||||||
|
nav_back=
|
||||||
|
menu_gotoline=<Control>l
|
||||||
|
edit_gotolinestart=Home
|
||||||
|
edit_gotolineend=End
|
||||||
|
edit_gotomatchingbrace=<Control>b
|
||||||
|
edit_togglemarker=<Control>m
|
||||||
|
edit_gotonextmarker=<Control>period
|
||||||
|
edit_gotopreviousmarker=<Control>comma
|
||||||
|
edit_prevwordstart=<Control>slash
|
||||||
|
edit_nextwordstart=<Control>backslash
|
||||||
|
popup_gototagdefinition=
|
||||||
|
popup_gototagdeclaration=
|
||||||
|
edit_gotolineendvisual=<Alt>End
|
||||||
|
menu_toggleall=
|
||||||
|
menu_fullscreen=F11
|
||||||
|
menu_messagewindow=
|
||||||
|
toggle_sidebar=
|
||||||
|
menu_zoomin=<Control>plus
|
||||||
|
menu_zoomout=<Control>minus
|
||||||
|
switch_editor=F2
|
||||||
|
switch_scribble=F6
|
||||||
|
switch_vte=F4
|
||||||
|
switch_search_bar=F7
|
||||||
|
switch_sidebar=
|
||||||
|
switch_compiler=
|
||||||
|
switch_tableft=<Control>Page_Up
|
||||||
|
switch_tabright=<Control>Page_Down
|
||||||
|
switch_tablastused=<Control>Tab
|
||||||
|
move_tableft=<Alt>Page_Up
|
||||||
|
move_tabright=<Alt>Page_Down
|
||||||
|
move_tabfirst=
|
||||||
|
move_tablast=
|
||||||
|
menu_replacetabs=
|
||||||
|
menu_replacespaces=
|
||||||
|
menu_togglefold=
|
||||||
|
menu_foldall=
|
||||||
|
menu_unfoldall=
|
||||||
|
reloadtaglist=<Shift><Control>r
|
||||||
|
menu_linewrap=
|
||||||
|
menu_linebreak=
|
||||||
|
build_compile=F8
|
||||||
|
build_link=F9
|
||||||
|
build_make=<Shift>F9
|
||||||
|
build_makeowntarget=<Shift><Control>F9
|
||||||
|
build_makeobject=
|
||||||
|
build_nexterror=
|
||||||
|
build_previouserror=
|
||||||
|
build_run=F5
|
||||||
|
build_run2=
|
||||||
|
build_options=
|
||||||
|
menu_opencolorchooser=
|
||||||
|
menu_help=F1
|
||||||
|
|
||||||
|
file_openlasttab=
|
||||||
|
edit_wordpartcompletion=Tab
|
||||||
|
edit_movelineup=
|
||||||
|
edit_movelinedown=
|
||||||
|
edit_selectwordpartleft=
|
||||||
|
edit_selectwordpartright=
|
||||||
|
menu_pluginpreferences=
|
||||||
|
normal_size=<Control>0
|
||||||
|
switch_messages=
|
||||||
|
switch_message_window=
|
||||||
|
switch_sidebar_doc_list=
|
||||||
|
switch_sidebar_symbol_list=
|
||||||
|
remove_markers=
|
||||||
|
remove_error_indicators=
|
||||||
|
|
||||||
|
[file_browser]
|
||||||
|
focus_file_list=
|
||||||
|
focus_path_entry=
|
||||||
|
|
||||||
|
[split_window]
|
||||||
|
split_horizontal=
|
||||||
|
split_vertical=
|
||||||
|
split_unsplit=
|
||||||
|
|
||||||
|
[html_chars]
|
||||||
|
insert_html_chars=
|
||||||
|
replace_special_characters=
|
||||||
|
htmltoogle_toggle_plugin_status=
|
||||||
|
|
||||||
|
[code_navigation]
|
||||||
|
switch_head_impl=<Shift><Alt>s
|
||||||
|
goto_file=<Shift><Alt>g
|
||||||
|
|
||||||
|
[extra_select]
|
||||||
|
column_mode=
|
||||||
|
goto_line_extend=
|
||||||
|
brace_match_extend=
|
||||||
|
|
||||||
|
[debug]
|
||||||
|
"_Load"=
|
||||||
|
"_Unload"=
|
||||||
|
"_Run"=
|
||||||
|
"_Kill"=
|
||||||
|
"_Pause"=
|
||||||
|
"_Continue"=
|
||||||
|
"_Step"=
|
||||||
|
"Step _Into"=
|
||||||
|
"_Next"=
|
||||||
|
"Ne_xt in"=
|
||||||
|
"Run _To"=
|
||||||
|
"Sta_ck"=
|
||||||
|
"_Break"=
|
||||||
|
"_Watches"=
|
||||||
|
"_Finish"=
|
||||||
|
"_Return"=
|
||||||
|
"En_vironment"=
|
||||||
|
"_Options"=
|
||||||
|
|
||||||
|
[geanylatex]
|
||||||
|
run_latex_wizard=
|
||||||
|
insert_latex_label=
|
||||||
|
insert_latex_ref=
|
||||||
|
insert_new_line=
|
||||||
|
latex_toggle_status=
|
||||||
|
latex_insert_environment=
|
||||||
|
latex_insert_item=
|
||||||
|
latex_replace_chars=
|
||||||
|
format_bold=
|
||||||
|
format_italic=
|
||||||
|
format_typewriter=
|
||||||
|
format_center=
|
||||||
|
format_left=
|
||||||
|
format_right=
|
||||||
|
insert_description_list=
|
||||||
|
insert_itemize_list=
|
||||||
|
insert_enumerate_list=
|
||||||
|
structure_lvl_up=
|
||||||
|
structure_lvl_down=
|
||||||
|
usepackage_dialog=
|
||||||
|
latex_insert_command=
|
||||||
|
|
||||||
|
[geanylipsum]
|
||||||
|
insert_lipsum=
|
||||||
|
|
||||||
|
[sendmail]
|
||||||
|
send_file_as_attachment=
|
||||||
|
|
||||||
|
[geanyvc]
|
||||||
|
vc_show_diff_of_file=
|
||||||
|
vc_show_diff_of_dir=
|
||||||
|
vc_show_diff_of_basedir=
|
||||||
|
vc_commit=
|
||||||
|
vc_status=
|
||||||
|
vc_update=
|
||||||
|
vc_revert_file=
|
||||||
|
vc_revert_dir=
|
||||||
|
vc_revert_basedir=
|
||||||
|
|
||||||
|
[insert_numbers]
|
||||||
|
insert_numbers=
|
||||||
|
|
||||||
|
[spellcheck]
|
||||||
|
spell_check=
|
||||||
|
spell_toggle_typing=
|
||||||
|
|
||||||
|
[prettyprinter]
|
||||||
|
run_pretty_printer_xml=
|
||||||
|
|
||||||
|
[doc_chars]
|
||||||
|
Документация на слово под курсором=
|
||||||
|
Document interactive=
|
||||||
|
|
||||||
|
[addons]
|
||||||
|
focus_bookmark_list=
|
||||||
|
focus_tasks=
|
||||||
|
update_tasks=
|
||||||
|
xml_tagging=
|
||||||
|
|
||||||
|
[shiftcolumn]
|
||||||
|
shift_left=<Control>9
|
||||||
|
shift_right=<Control>0
|
|
@ -0,0 +1,105 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
|
||||||
|
# The name which appears in the menu:
|
||||||
|
Name=Awesome BG 1
|
||||||
|
#Name[cs]=Šablona
|
||||||
|
#Name[fr]=Modèle
|
||||||
|
#Name[de]=Vorlage
|
||||||
|
|
||||||
|
# Replace "command" with the actual command or script:
|
||||||
|
Exec=rm -f ~/.config/awesome/wallpaper1.slink ; ln -sf "%f" ~/.config/awesome/wallpaper1.slink ; killall -s SIGHUP awesome
|
||||||
|
|
||||||
|
# Where <param> may be:
|
||||||
|
# omitted If no parameter is given the command will be executed in the
|
||||||
|
# current folder. If a parameter is given but the current folder
|
||||||
|
# does not contain any files, the command will not be run.
|
||||||
|
#
|
||||||
|
# %f A single file name, even if multiple files are selected. The
|
||||||
|
# system reading the desktop entry should recognize that the program in
|
||||||
|
# question cannot handle multiple file arguments, and it should should
|
||||||
|
# probably spawn and execute multiple copies of a program for each
|
||||||
|
# selected file if the program is not able to handle additional file
|
||||||
|
# arguments. If files are not on the local file system (i.e. are on HTTP
|
||||||
|
# or FTP locations), the files will be copied to the local file system
|
||||||
|
# and %f will be expanded to point at the temporary file. Used for
|
||||||
|
# programs that do not understand the URL syntax.
|
||||||
|
#
|
||||||
|
# %F A list of files. Use for apps that can open several local files
|
||||||
|
# at once. Each file is passed as a separate argument to the executable
|
||||||
|
# program.
|
||||||
|
#
|
||||||
|
# %u A single URL. Local files may either be passed as file: URLs or
|
||||||
|
# as file path.
|
||||||
|
#
|
||||||
|
# %U A list of URLs. Each URL is passed as a separate argument to
|
||||||
|
# the executable program. Local files may either be passed as file: URLs
|
||||||
|
# or as file path.
|
||||||
|
#
|
||||||
|
# %% Percent sign. Use anywhere you want '%' to appear in your command.
|
||||||
|
|
||||||
|
# Change the following line to point to an icon of your choosing
|
||||||
|
Icon=gtk-file
|
||||||
|
|
||||||
|
# Use the following to only show this menu entry if the command is installed
|
||||||
|
#TryExec=command
|
||||||
|
|
||||||
|
# Desktop files that are usable only in Geeqie should be marked like this:
|
||||||
|
Categories=X-Geeqie;
|
||||||
|
OnlyShowIn=X-Geeqie;
|
||||||
|
|
||||||
|
# Uncomment the following line to include in a Geeqie menu
|
||||||
|
# other than in the default path of PluginsMenu
|
||||||
|
#X-Geeqie-Menu-Path=<FileMenuPath>
|
||||||
|
|
||||||
|
# e.g.
|
||||||
|
#X-Geeqie-Menu-Path=SelectMenu/SelectSection
|
||||||
|
|
||||||
|
# Valid sections are:
|
||||||
|
# FileMenu
|
||||||
|
# FileMenu/OpenSection
|
||||||
|
# FileMenu/SearchSection
|
||||||
|
# FileMenu/PrintSection
|
||||||
|
# FileMenu/FileOpsSection
|
||||||
|
# FileMenu/QuitSection
|
||||||
|
# GoMenu
|
||||||
|
# SelectMenu
|
||||||
|
# SelectMenu/SelectSection
|
||||||
|
# SelectMenu/ClipboardSection
|
||||||
|
# SelectMenu/MarksSection
|
||||||
|
# EditMenu
|
||||||
|
# EditMenu/EditSection
|
||||||
|
# EditMenu/OrientationMenu
|
||||||
|
# EditMenu/RatingMenu
|
||||||
|
# EditMenu/PropertiesSection
|
||||||
|
# EditMenu/PreferencesSection
|
||||||
|
# PluginsMenu
|
||||||
|
# ViewMenu
|
||||||
|
# ViewMenu/WindowSection
|
||||||
|
# ViewMenu/FileDirMenu
|
||||||
|
# ViewMenu/FileDirMenu/FolderSection
|
||||||
|
# ViewMenu/FileDirMenu/ListSection
|
||||||
|
# ViewMenu/DirSection
|
||||||
|
# ViewMenu/ZoomMenu
|
||||||
|
# ViewMenu/ZoomMenu/ConnectZoomMenu
|
||||||
|
# ViewMenu/SplitMenu
|
||||||
|
# ViewMenu/StereoMenu
|
||||||
|
# ViewMenu/ColorMenu
|
||||||
|
# ViewMenu/OverlayMenu
|
||||||
|
# ViewMenu/ViewSection
|
||||||
|
# ViewMenu/ToolsSection
|
||||||
|
# ViewMenu/SlideShowSection
|
||||||
|
# WindowsMenu
|
||||||
|
# WindowsMenu/NewWindow
|
||||||
|
# HelpMenu
|
||||||
|
# HelpMenu/HelpSection
|
||||||
|
|
||||||
|
# This is a filter - see symlink.desktop and geeqie-symlink for an example
|
||||||
|
# of how to use this feature, or the Plugins section of the Help file.
|
||||||
|
#X-Geeqie-Filter=true
|
||||||
|
|
||||||
|
# It can be made verbose
|
||||||
|
#X-Geeqie-Verbose=true
|
||||||
|
|
||||||
|
# For other keys such as MimeType see https://developer.gnome.org/desktop-entry-spec/
|
|
@ -0,0 +1,105 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
|
||||||
|
# The name which appears in the menu:
|
||||||
|
Name=Awesome BG 2
|
||||||
|
#Name[cs]=Šablona
|
||||||
|
#Name[fr]=Modèle
|
||||||
|
#Name[de]=Vorlage
|
||||||
|
|
||||||
|
# Replace "command" with the actual command or script:
|
||||||
|
Exec=rm -f ~/.config/awesome/wallpaper2.slink ; ln -sf "%f" ~/.config/awesome/wallpaper2.slink ; killall -s SIGHUP awesome
|
||||||
|
|
||||||
|
# Where <param> may be:
|
||||||
|
# omitted If no parameter is given the command will be executed in the
|
||||||
|
# current folder. If a parameter is given but the current folder
|
||||||
|
# does not contain any files, the command will not be run.
|
||||||
|
#
|
||||||
|
# %f A single file name, even if multiple files are selected. The
|
||||||
|
# system reading the desktop entry should recognize that the program in
|
||||||
|
# question cannot handle multiple file arguments, and it should should
|
||||||
|
# probably spawn and execute multiple copies of a program for each
|
||||||
|
# selected file if the program is not able to handle additional file
|
||||||
|
# arguments. If files are not on the local file system (i.e. are on HTTP
|
||||||
|
# or FTP locations), the files will be copied to the local file system
|
||||||
|
# and %f will be expanded to point at the temporary file. Used for
|
||||||
|
# programs that do not understand the URL syntax.
|
||||||
|
#
|
||||||
|
# %F A list of files. Use for apps that can open several local files
|
||||||
|
# at once. Each file is passed as a separate argument to the executable
|
||||||
|
# program.
|
||||||
|
#
|
||||||
|
# %u A single URL. Local files may either be passed as file: URLs or
|
||||||
|
# as file path.
|
||||||
|
#
|
||||||
|
# %U A list of URLs. Each URL is passed as a separate argument to
|
||||||
|
# the executable program. Local files may either be passed as file: URLs
|
||||||
|
# or as file path.
|
||||||
|
#
|
||||||
|
# %% Percent sign. Use anywhere you want '%' to appear in your command.
|
||||||
|
|
||||||
|
# Change the following line to point to an icon of your choosing
|
||||||
|
Icon=gtk-file
|
||||||
|
|
||||||
|
# Use the following to only show this menu entry if the command is installed
|
||||||
|
#TryExec=command
|
||||||
|
|
||||||
|
# Desktop files that are usable only in Geeqie should be marked like this:
|
||||||
|
Categories=X-Geeqie;
|
||||||
|
OnlyShowIn=X-Geeqie;
|
||||||
|
|
||||||
|
# Uncomment the following line to include in a Geeqie menu
|
||||||
|
# other than in the default path of PluginsMenu
|
||||||
|
#X-Geeqie-Menu-Path=<FileMenuPath>
|
||||||
|
|
||||||
|
# e.g.
|
||||||
|
#X-Geeqie-Menu-Path=SelectMenu/SelectSection
|
||||||
|
|
||||||
|
# Valid sections are:
|
||||||
|
# FileMenu
|
||||||
|
# FileMenu/OpenSection
|
||||||
|
# FileMenu/SearchSection
|
||||||
|
# FileMenu/PrintSection
|
||||||
|
# FileMenu/FileOpsSection
|
||||||
|
# FileMenu/QuitSection
|
||||||
|
# GoMenu
|
||||||
|
# SelectMenu
|
||||||
|
# SelectMenu/SelectSection
|
||||||
|
# SelectMenu/ClipboardSection
|
||||||
|
# SelectMenu/MarksSection
|
||||||
|
# EditMenu
|
||||||
|
# EditMenu/EditSection
|
||||||
|
# EditMenu/OrientationMenu
|
||||||
|
# EditMenu/RatingMenu
|
||||||
|
# EditMenu/PropertiesSection
|
||||||
|
# EditMenu/PreferencesSection
|
||||||
|
# PluginsMenu
|
||||||
|
# ViewMenu
|
||||||
|
# ViewMenu/WindowSection
|
||||||
|
# ViewMenu/FileDirMenu
|
||||||
|
# ViewMenu/FileDirMenu/FolderSection
|
||||||
|
# ViewMenu/FileDirMenu/ListSection
|
||||||
|
# ViewMenu/DirSection
|
||||||
|
# ViewMenu/ZoomMenu
|
||||||
|
# ViewMenu/ZoomMenu/ConnectZoomMenu
|
||||||
|
# ViewMenu/SplitMenu
|
||||||
|
# ViewMenu/StereoMenu
|
||||||
|
# ViewMenu/ColorMenu
|
||||||
|
# ViewMenu/OverlayMenu
|
||||||
|
# ViewMenu/ViewSection
|
||||||
|
# ViewMenu/ToolsSection
|
||||||
|
# ViewMenu/SlideShowSection
|
||||||
|
# WindowsMenu
|
||||||
|
# WindowsMenu/NewWindow
|
||||||
|
# HelpMenu
|
||||||
|
# HelpMenu/HelpSection
|
||||||
|
|
||||||
|
# This is a filter - see symlink.desktop and geeqie-symlink for an example
|
||||||
|
# of how to use this feature, or the Plugins section of the Help file.
|
||||||
|
#X-Geeqie-Filter=true
|
||||||
|
|
||||||
|
# It can be made verbose
|
||||||
|
#X-Geeqie-Verbose=true
|
||||||
|
|
||||||
|
# For other keys such as MimeType see https://developer.gnome.org/desktop-entry-spec/
|
|
@ -0,0 +1,105 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
|
||||||
|
# The name which appears in the menu:
|
||||||
|
Name=Awesome BG 3
|
||||||
|
#Name[cs]=Šablona
|
||||||
|
#Name[fr]=Modèle
|
||||||
|
#Name[de]=Vorlage
|
||||||
|
|
||||||
|
# Replace "command" with the actual command or script:
|
||||||
|
Exec=rm -f ~/.config/awesome/wallpaper3.slink ; ln -sf "%f" ~/.config/awesome/wallpaper3.slink ; killall -s SIGHUP awesome
|
||||||
|
|
||||||
|
# Where <param> may be:
|
||||||
|
# omitted If no parameter is given the command will be executed in the
|
||||||
|
# current folder. If a parameter is given but the current folder
|
||||||
|
# does not contain any files, the command will not be run.
|
||||||
|
#
|
||||||
|
# %f A single file name, even if multiple files are selected. The
|
||||||
|
# system reading the desktop entry should recognize that the program in
|
||||||
|
# question cannot handle multiple file arguments, and it should should
|
||||||
|
# probably spawn and execute multiple copies of a program for each
|
||||||
|
# selected file if the program is not able to handle additional file
|
||||||
|
# arguments. If files are not on the local file system (i.e. are on HTTP
|
||||||
|
# or FTP locations), the files will be copied to the local file system
|
||||||
|
# and %f will be expanded to point at the temporary file. Used for
|
||||||
|
# programs that do not understand the URL syntax.
|
||||||
|
#
|
||||||
|
# %F A list of files. Use for apps that can open several local files
|
||||||
|
# at once. Each file is passed as a separate argument to the executable
|
||||||
|
# program.
|
||||||
|
#
|
||||||
|
# %u A single URL. Local files may either be passed as file: URLs or
|
||||||
|
# as file path.
|
||||||
|
#
|
||||||
|
# %U A list of URLs. Each URL is passed as a separate argument to
|
||||||
|
# the executable program. Local files may either be passed as file: URLs
|
||||||
|
# or as file path.
|
||||||
|
#
|
||||||
|
# %% Percent sign. Use anywhere you want '%' to appear in your command.
|
||||||
|
|
||||||
|
# Change the following line to point to an icon of your choosing
|
||||||
|
Icon=gtk-file
|
||||||
|
|
||||||
|
# Use the following to only show this menu entry if the command is installed
|
||||||
|
#TryExec=command
|
||||||
|
|
||||||
|
# Desktop files that are usable only in Geeqie should be marked like this:
|
||||||
|
Categories=X-Geeqie;
|
||||||
|
OnlyShowIn=X-Geeqie;
|
||||||
|
|
||||||
|
# Uncomment the following line to include in a Geeqie menu
|
||||||
|
# other than in the default path of PluginsMenu
|
||||||
|
#X-Geeqie-Menu-Path=<FileMenuPath>
|
||||||
|
|
||||||
|
# e.g.
|
||||||
|
#X-Geeqie-Menu-Path=SelectMenu/SelectSection
|
||||||
|
|
||||||
|
# Valid sections are:
|
||||||
|
# FileMenu
|
||||||
|
# FileMenu/OpenSection
|
||||||
|
# FileMenu/SearchSection
|
||||||
|
# FileMenu/PrintSection
|
||||||
|
# FileMenu/FileOpsSection
|
||||||
|
# FileMenu/QuitSection
|
||||||
|
# GoMenu
|
||||||
|
# SelectMenu
|
||||||
|
# SelectMenu/SelectSection
|
||||||
|
# SelectMenu/ClipboardSection
|
||||||
|
# SelectMenu/MarksSection
|
||||||
|
# EditMenu
|
||||||
|
# EditMenu/EditSection
|
||||||
|
# EditMenu/OrientationMenu
|
||||||
|
# EditMenu/RatingMenu
|
||||||
|
# EditMenu/PropertiesSection
|
||||||
|
# EditMenu/PreferencesSection
|
||||||
|
# PluginsMenu
|
||||||
|
# ViewMenu
|
||||||
|
# ViewMenu/WindowSection
|
||||||
|
# ViewMenu/FileDirMenu
|
||||||
|
# ViewMenu/FileDirMenu/FolderSection
|
||||||
|
# ViewMenu/FileDirMenu/ListSection
|
||||||
|
# ViewMenu/DirSection
|
||||||
|
# ViewMenu/ZoomMenu
|
||||||
|
# ViewMenu/ZoomMenu/ConnectZoomMenu
|
||||||
|
# ViewMenu/SplitMenu
|
||||||
|
# ViewMenu/StereoMenu
|
||||||
|
# ViewMenu/ColorMenu
|
||||||
|
# ViewMenu/OverlayMenu
|
||||||
|
# ViewMenu/ViewSection
|
||||||
|
# ViewMenu/ToolsSection
|
||||||
|
# ViewMenu/SlideShowSection
|
||||||
|
# WindowsMenu
|
||||||
|
# WindowsMenu/NewWindow
|
||||||
|
# HelpMenu
|
||||||
|
# HelpMenu/HelpSection
|
||||||
|
|
||||||
|
# This is a filter - see symlink.desktop and geeqie-symlink for an example
|
||||||
|
# of how to use this feature, or the Plugins section of the Help file.
|
||||||
|
#X-Geeqie-Filter=true
|
||||||
|
|
||||||
|
# It can be made verbose
|
||||||
|
#X-Geeqie-Verbose=true
|
||||||
|
|
||||||
|
# For other keys such as MimeType see https://developer.gnome.org/desktop-entry-spec/
|
|
@ -0,0 +1,105 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
|
||||||
|
# The name which appears in the menu:
|
||||||
|
Name=Awesome BG 4
|
||||||
|
#Name[cs]=Šablona
|
||||||
|
#Name[fr]=Modèle
|
||||||
|
#Name[de]=Vorlage
|
||||||
|
|
||||||
|
# Replace "command" with the actual command or script:
|
||||||
|
Exec=rm -f ~/.config/awesome/wallpaper4.slink ; ln -sf "%f" ~/.config/awesome/wallpaper4.slink ; killall -s SIGHUP awesome
|
||||||
|
|
||||||
|
# Where <param> may be:
|
||||||
|
# omitted If no parameter is given the command will be executed in the
|
||||||
|
# current folder. If a parameter is given but the current folder
|
||||||
|
# does not contain any files, the command will not be run.
|
||||||
|
#
|
||||||
|
# %f A single file name, even if multiple files are selected. The
|
||||||
|
# system reading the desktop entry should recognize that the program in
|
||||||
|
# question cannot handle multiple file arguments, and it should should
|
||||||
|
# probably spawn and execute multiple copies of a program for each
|
||||||
|
# selected file if the program is not able to handle additional file
|
||||||
|
# arguments. If files are not on the local file system (i.e. are on HTTP
|
||||||
|
# or FTP locations), the files will be copied to the local file system
|
||||||
|
# and %f will be expanded to point at the temporary file. Used for
|
||||||
|
# programs that do not understand the URL syntax.
|
||||||
|
#
|
||||||
|
# %F A list of files. Use for apps that can open several local files
|
||||||
|
# at once. Each file is passed as a separate argument to the executable
|
||||||
|
# program.
|
||||||
|
#
|
||||||
|
# %u A single URL. Local files may either be passed as file: URLs or
|
||||||
|
# as file path.
|
||||||
|
#
|
||||||
|
# %U A list of URLs. Each URL is passed as a separate argument to
|
||||||
|
# the executable program. Local files may either be passed as file: URLs
|
||||||
|
# or as file path.
|
||||||
|
#
|
||||||
|
# %% Percent sign. Use anywhere you want '%' to appear in your command.
|
||||||
|
|
||||||
|
# Change the following line to point to an icon of your choosing
|
||||||
|
Icon=gtk-file
|
||||||
|
|
||||||
|
# Use the following to only show this menu entry if the command is installed
|
||||||
|
#TryExec=command
|
||||||
|
|
||||||
|
# Desktop files that are usable only in Geeqie should be marked like this:
|
||||||
|
Categories=X-Geeqie;
|
||||||
|
OnlyShowIn=X-Geeqie;
|
||||||
|
|
||||||
|
# Uncomment the following line to include in a Geeqie menu
|
||||||
|
# other than in the default path of PluginsMenu
|
||||||
|
#X-Geeqie-Menu-Path=<FileMenuPath>
|
||||||
|
|
||||||
|
# e.g.
|
||||||
|
#X-Geeqie-Menu-Path=SelectMenu/SelectSection
|
||||||
|
|
||||||
|
# Valid sections are:
|
||||||
|
# FileMenu
|
||||||
|
# FileMenu/OpenSection
|
||||||
|
# FileMenu/SearchSection
|
||||||
|
# FileMenu/PrintSection
|
||||||
|
# FileMenu/FileOpsSection
|
||||||
|
# FileMenu/QuitSection
|
||||||
|
# GoMenu
|
||||||
|
# SelectMenu
|
||||||
|
# SelectMenu/SelectSection
|
||||||
|
# SelectMenu/ClipboardSection
|
||||||
|
# SelectMenu/MarksSection
|
||||||
|
# EditMenu
|
||||||
|
# EditMenu/EditSection
|
||||||
|
# EditMenu/OrientationMenu
|
||||||
|
# EditMenu/RatingMenu
|
||||||
|
# EditMenu/PropertiesSection
|
||||||
|
# EditMenu/PreferencesSection
|
||||||
|
# PluginsMenu
|
||||||
|
# ViewMenu
|
||||||
|
# ViewMenu/WindowSection
|
||||||
|
# ViewMenu/FileDirMenu
|
||||||
|
# ViewMenu/FileDirMenu/FolderSection
|
||||||
|
# ViewMenu/FileDirMenu/ListSection
|
||||||
|
# ViewMenu/DirSection
|
||||||
|
# ViewMenu/ZoomMenu
|
||||||
|
# ViewMenu/ZoomMenu/ConnectZoomMenu
|
||||||
|
# ViewMenu/SplitMenu
|
||||||
|
# ViewMenu/StereoMenu
|
||||||
|
# ViewMenu/ColorMenu
|
||||||
|
# ViewMenu/OverlayMenu
|
||||||
|
# ViewMenu/ViewSection
|
||||||
|
# ViewMenu/ToolsSection
|
||||||
|
# ViewMenu/SlideShowSection
|
||||||
|
# WindowsMenu
|
||||||
|
# WindowsMenu/NewWindow
|
||||||
|
# HelpMenu
|
||||||
|
# HelpMenu/HelpSection
|
||||||
|
|
||||||
|
# This is a filter - see symlink.desktop and geeqie-symlink for an example
|
||||||
|
# of how to use this feature, or the Plugins section of the Help file.
|
||||||
|
#X-Geeqie-Filter=true
|
||||||
|
|
||||||
|
# It can be made verbose
|
||||||
|
#X-Geeqie-Verbose=true
|
||||||
|
|
||||||
|
# For other keys such as MimeType see https://developer.gnome.org/desktop-entry-spec/
|
|
@ -0,0 +1,105 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
|
||||||
|
# The name which appears in the menu:
|
||||||
|
Name=Awesome BG
|
||||||
|
#Name[cs]=Šablona
|
||||||
|
#Name[fr]=Modèle
|
||||||
|
#Name[de]=Vorlage
|
||||||
|
|
||||||
|
# Replace "command" with the actual command or script:
|
||||||
|
Exec=rm -f ~/.config/awesome/wallpaper.slink ; ln -sf "%f" ~/.config/awesome/wallpaper.slink ; ~/.config/awesome/set_wall.sh ~/.config/awesome/wallpaper.slink
|
||||||
|
|
||||||
|
# Where <param> may be:
|
||||||
|
# omitted If no parameter is given the command will be executed in the
|
||||||
|
# current folder. If a parameter is given but the current folder
|
||||||
|
# does not contain any files, the command will not be run.
|
||||||
|
#
|
||||||
|
# %f A single file name, even if multiple files are selected. The
|
||||||
|
# system reading the desktop entry should recognize that the program in
|
||||||
|
# question cannot handle multiple file arguments, and it should should
|
||||||
|
# probably spawn and execute multiple copies of a program for each
|
||||||
|
# selected file if the program is not able to handle additional file
|
||||||
|
# arguments. If files are not on the local file system (i.e. are on HTTP
|
||||||
|
# or FTP locations), the files will be copied to the local file system
|
||||||
|
# and %f will be expanded to point at the temporary file. Used for
|
||||||
|
# programs that do not understand the URL syntax.
|
||||||
|
#
|
||||||
|
# %F A list of files. Use for apps that can open several local files
|
||||||
|
# at once. Each file is passed as a separate argument to the executable
|
||||||
|
# program.
|
||||||
|
#
|
||||||
|
# %u A single URL. Local files may either be passed as file: URLs or
|
||||||
|
# as file path.
|
||||||
|
#
|
||||||
|
# %U A list of URLs. Each URL is passed as a separate argument to
|
||||||
|
# the executable program. Local files may either be passed as file: URLs
|
||||||
|
# or as file path.
|
||||||
|
#
|
||||||
|
# %% Percent sign. Use anywhere you want '%' to appear in your command.
|
||||||
|
|
||||||
|
# Change the following line to point to an icon of your choosing
|
||||||
|
Icon=gtk-file
|
||||||
|
|
||||||
|
# Use the following to only show this menu entry if the command is installed
|
||||||
|
#TryExec=command
|
||||||
|
|
||||||
|
# Desktop files that are usable only in Geeqie should be marked like this:
|
||||||
|
Categories=X-Geeqie;
|
||||||
|
OnlyShowIn=X-Geeqie;
|
||||||
|
|
||||||
|
# Uncomment the following line to include in a Geeqie menu
|
||||||
|
# other than in the default path of PluginsMenu
|
||||||
|
#X-Geeqie-Menu-Path=<FileMenuPath>
|
||||||
|
|
||||||
|
# e.g.
|
||||||
|
#X-Geeqie-Menu-Path=SelectMenu/SelectSection
|
||||||
|
|
||||||
|
# Valid sections are:
|
||||||
|
# FileMenu
|
||||||
|
# FileMenu/OpenSection
|
||||||
|
# FileMenu/SearchSection
|
||||||
|
# FileMenu/PrintSection
|
||||||
|
# FileMenu/FileOpsSection
|
||||||
|
# FileMenu/QuitSection
|
||||||
|
# GoMenu
|
||||||
|
# SelectMenu
|
||||||
|
# SelectMenu/SelectSection
|
||||||
|
# SelectMenu/ClipboardSection
|
||||||
|
# SelectMenu/MarksSection
|
||||||
|
# EditMenu
|
||||||
|
# EditMenu/EditSection
|
||||||
|
# EditMenu/OrientationMenu
|
||||||
|
# EditMenu/RatingMenu
|
||||||
|
# EditMenu/PropertiesSection
|
||||||
|
# EditMenu/PreferencesSection
|
||||||
|
# PluginsMenu
|
||||||
|
# ViewMenu
|
||||||
|
# ViewMenu/WindowSection
|
||||||
|
# ViewMenu/FileDirMenu
|
||||||
|
# ViewMenu/FileDirMenu/FolderSection
|
||||||
|
# ViewMenu/FileDirMenu/ListSection
|
||||||
|
# ViewMenu/DirSection
|
||||||
|
# ViewMenu/ZoomMenu
|
||||||
|
# ViewMenu/ZoomMenu/ConnectZoomMenu
|
||||||
|
# ViewMenu/SplitMenu
|
||||||
|
# ViewMenu/StereoMenu
|
||||||
|
# ViewMenu/ColorMenu
|
||||||
|
# ViewMenu/OverlayMenu
|
||||||
|
# ViewMenu/ViewSection
|
||||||
|
# ViewMenu/ToolsSection
|
||||||
|
# ViewMenu/SlideShowSection
|
||||||
|
# WindowsMenu
|
||||||
|
# WindowsMenu/NewWindow
|
||||||
|
# HelpMenu
|
||||||
|
# HelpMenu/HelpSection
|
||||||
|
|
||||||
|
# This is a filter - see symlink.desktop and geeqie-symlink for an example
|
||||||
|
# of how to use this feature, or the Plugins section of the Help file.
|
||||||
|
#X-Geeqie-Filter=true
|
||||||
|
|
||||||
|
# It can be made verbose
|
||||||
|
#X-Geeqie-Verbose=true
|
||||||
|
|
||||||
|
# For other keys such as MimeType see https://developer.gnome.org/desktop-entry-spec/
|
|
@ -0,0 +1,12 @@
|
||||||
|
.window-frame {
|
||||||
|
box-shadow: none;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.scrollbar.vertical slider,
|
||||||
|
scrollbar.vertical slider {
|
||||||
|
min-width: 12px;
|
||||||
|
}
|
||||||
|
.scrollbar.horizontal slider,
|
||||||
|
scrollbar.horizontal slider {
|
||||||
|
min-height: 12px;
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
[Settings]
|
||||||
|
#gtk-theme-name = Zukitwo
|
||||||
|
|
||||||
|
gtk-font-name=Liberation Sans 12
|
||||||
|
gtk-toolbar-style=GTK_TOOLBAR_ICONS
|
||||||
|
|
||||||
|
gtk-enable-animations = 0
|
||||||
|
|
||||||
|
gtk-menu-images=0
|
||||||
|
gtk-button-images=0
|
||||||
|
|
||||||
|
#gtk-icon-theme-name= oxygen
|
||||||
|
#gtk-fallback-icon-theme=oxygen
|
||||||
|
|
||||||
|
#gtk-cursor-theme-name = gentoo-silver
|
||||||
|
gtk-cursor-theme-size = 24
|
||||||
|
|
||||||
|
#gtk-xft-antialias = 1
|
||||||
|
#gtk-xft-dpi = 90
|
||||||
|
#gtk-xft-hinting = 1
|
||||||
|
#gtk-xft-hintstyle = hintslight
|
||||||
|
#gtk-xft-rgba = rgb
|
|
@ -0,0 +1,26 @@
|
||||||
|
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||||
|
# The parser is also very primitive, and not human-friendly.
|
||||||
|
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||||
|
sort_key=46
|
||||||
|
sort_direction=1
|
||||||
|
hide_threads=0
|
||||||
|
hide_kernel_threads=1
|
||||||
|
hide_userland_threads=0
|
||||||
|
shadow_other_users=0
|
||||||
|
show_thread_names=0
|
||||||
|
show_program_path=1
|
||||||
|
highlight_base_name=0
|
||||||
|
highlight_megabytes=1
|
||||||
|
highlight_threads=1
|
||||||
|
tree_view=0
|
||||||
|
header_margin=1
|
||||||
|
detailed_cpu_time=0
|
||||||
|
cpu_count_from_zero=0
|
||||||
|
update_process_names=0
|
||||||
|
account_guest_in_cpu_meter=0
|
||||||
|
color_scheme=0
|
||||||
|
delay=15
|
||||||
|
left_meters=LeftCPUs Memory Swap
|
||||||
|
left_meter_modes=1 1 1
|
||||||
|
right_meters=RightCPUs Tasks LoadAverage Uptime CPU
|
||||||
|
right_meter_modes=1 2 2 2 1
|
174
.config/mc/ini
174
.config/mc/ini
|
@ -1,78 +1,77 @@
|
||||||
|
|
||||||
[Midnight-Commander]
|
[Midnight-Commander]
|
||||||
verbose=1
|
verbose=true
|
||||||
pause_after_run=1
|
pause_after_run=1
|
||||||
shell_patterns=1
|
shell_patterns=true
|
||||||
auto_save_setup=1
|
auto_save_setup=true
|
||||||
auto_menu=0
|
auto_menu=false
|
||||||
use_internal_view=0
|
use_internal_view=false
|
||||||
use_internal_edit=0
|
use_internal_edit=false
|
||||||
clear_before_exec=1
|
clear_before_exec=true
|
||||||
confirm_delete=1
|
confirm_delete=true
|
||||||
confirm_overwrite=1
|
confirm_overwrite=true
|
||||||
confirm_execute=0
|
confirm_execute=false
|
||||||
confirm_history_cleanup=1
|
confirm_history_cleanup=true
|
||||||
confirm_exit=1
|
confirm_exit=true
|
||||||
confirm_directory_hotlist_delete=1
|
confirm_directory_hotlist_delete=true
|
||||||
safe_delete=0
|
safe_delete=false
|
||||||
mouse_repeat_rate=100
|
mouse_repeat_rate=100
|
||||||
double_click_speed=250
|
double_click_speed=250
|
||||||
use_8th_bit_as_meta=0
|
use_8th_bit_as_meta=false
|
||||||
confirm_view_dir=0
|
confirm_view_dir=false
|
||||||
mouse_move_pages_viewer=1
|
mouse_move_pages_viewer=true
|
||||||
mouse_close_dialog=0
|
mouse_close_dialog=false
|
||||||
fast_refresh=0
|
fast_refresh=false
|
||||||
drop_menus=0
|
drop_menus=false
|
||||||
wrap_mode=1
|
wrap_mode=true
|
||||||
old_esc_mode=1
|
old_esc_mode=true
|
||||||
old_esc_mode_timeout=1000000
|
old_esc_mode_timeout=1000000
|
||||||
cd_symlinks=1
|
cd_symlinks=true
|
||||||
show_all_if_ambiguous=0
|
show_all_if_ambiguous=false
|
||||||
max_dirt_limit=10
|
max_dirt_limit=10
|
||||||
torben_fj_mode=0
|
torben_fj_mode=0
|
||||||
use_file_to_guess_type=1
|
use_file_to_guess_type=true
|
||||||
alternate_plus_minus=0
|
alternate_plus_minus=false
|
||||||
only_leading_plus_minus=1
|
only_leading_plus_minus=true
|
||||||
show_output_starts_shell=0
|
show_output_starts_shell=false
|
||||||
xtree_mode=0
|
xtree_mode=false
|
||||||
num_history_items_recorded=60
|
num_history_items_recorded=60
|
||||||
file_op_compute_totals=1
|
file_op_compute_totals=true
|
||||||
classic_progressbar=0
|
classic_progressbar=false
|
||||||
vfs_timeout=60
|
vfs_timeout=60
|
||||||
ftpfs_directory_timeout=900
|
ftpfs_directory_timeout=900
|
||||||
use_netrc=1
|
use_netrc=true
|
||||||
ftpfs_retry_seconds=30
|
ftpfs_retry_seconds=30
|
||||||
ftpfs_always_use_proxy=0
|
ftpfs_always_use_proxy=false
|
||||||
ftpfs_use_passive_connections=1
|
ftpfs_use_passive_connections=true
|
||||||
ftpfs_use_passive_connections_over_proxy=0
|
ftpfs_use_passive_connections_over_proxy=false
|
||||||
ftpfs_use_unix_list_options=1
|
ftpfs_use_unix_list_options=true
|
||||||
ftpfs_first_cd_then_ls=1
|
ftpfs_first_cd_then_ls=true
|
||||||
fish_directory_timeout=900
|
fish_directory_timeout=900
|
||||||
editor_tab_spacing=8
|
editor_tab_spacing=8
|
||||||
editor_word_wrap_line_length=72
|
editor_word_wrap_line_length=72
|
||||||
editor_fill_tabs_with_spaces=0
|
editor_fill_tabs_with_spaces=false
|
||||||
editor_return_does_auto_indent=1
|
editor_return_does_auto_indent=true
|
||||||
editor_backspace_through_tabs=0
|
editor_backspace_through_tabs=false
|
||||||
editor_fake_half_tabs=1
|
editor_fake_half_tabs=true
|
||||||
editor_option_save_mode=0
|
editor_option_save_mode=0
|
||||||
editor_option_save_position=1
|
editor_option_save_position=true
|
||||||
editor_option_auto_para_formatting=0
|
editor_option_auto_para_formatting=false
|
||||||
editor_option_typewriter_wrap=0
|
editor_option_typewriter_wrap=false
|
||||||
editor_edit_confirm_save=1
|
editor_edit_confirm_save=true
|
||||||
editor_syntax_highlighting=1
|
editor_syntax_highlighting=true
|
||||||
editor_persistent_selections=1
|
editor_persistent_selections=true
|
||||||
editor_cursor_beyond_eol=0
|
editor_cursor_beyond_eol=false
|
||||||
editor_visible_tabs=1
|
editor_visible_tabs=true
|
||||||
editor_visible_spaces=1
|
editor_visible_spaces=true
|
||||||
editor_line_state=0
|
editor_line_state=false
|
||||||
editor_simple_statusbar=0
|
editor_simple_statusbar=false
|
||||||
editor_check_new_line=0
|
editor_check_new_line=false
|
||||||
editor_show_right_margin=0
|
editor_show_right_margin=false
|
||||||
nice_rotating_dash=1
|
nice_rotating_dash=true
|
||||||
horizontal_split=0
|
mcview_remember_file_position=false
|
||||||
mcview_remember_file_position=0
|
auto_fill_mkdir_name=true
|
||||||
auto_fill_mkdir_name=1
|
copymove_persistent_attr=true
|
||||||
copymove_persistent_attr=1
|
|
||||||
select_flags=6
|
select_flags=6
|
||||||
editor_backup_extension=~
|
editor_backup_extension=~
|
||||||
mcview_eof=
|
mcview_eof=
|
||||||
|
@ -92,31 +91,49 @@ permission_mode=0
|
||||||
quick_search_case_sensitive=2
|
quick_search_case_sensitive=2
|
||||||
ignore_ftp_chattr_errors=true
|
ignore_ftp_chattr_errors=true
|
||||||
keymap=mc.keymap
|
keymap=mc.keymap
|
||||||
skin=klmn0
|
skin=dark
|
||||||
|
|
||||||
panel_scroll_pages=1
|
panel_scroll_pages=1
|
||||||
auto_save_setup_panels=1
|
auto_save_setup_panels=1
|
||||||
|
|
||||||
filepos_max_saved_entries=1024
|
filepos_max_saved_entries=1024
|
||||||
|
|
||||||
preallocate_space=0
|
preallocate_space=false
|
||||||
editor_group_undo=0
|
editor_group_undo=false
|
||||||
|
|
||||||
|
editor_cursor_after_inserted_block=false
|
||||||
|
|
||||||
|
editor_ask_filename_before_edit=false
|
||||||
|
editor_filesize_threshold=64M
|
||||||
|
|
||||||
|
editor_drop_selection_on_copy=true
|
||||||
|
editor_stop_format_chars=-+*\\,.;:&>
|
||||||
|
|
||||||
|
editor_state_full_filename=false
|
||||||
|
|
||||||
|
safe_overwrite=false
|
||||||
|
|
||||||
|
shadows=true
|
||||||
|
|
||||||
[Layout]
|
[Layout]
|
||||||
equal_split=1
|
message_visible=true
|
||||||
first_panel_size=142
|
keybar_visible=false
|
||||||
message_visible=1
|
xterm_title=true
|
||||||
keybar_visible=0
|
|
||||||
xterm_title=1
|
|
||||||
output_lines=0
|
output_lines=0
|
||||||
command_prompt=1
|
command_prompt=true
|
||||||
menubar_visible=0
|
menubar_visible=false
|
||||||
show_mini_info=1
|
show_mini_info=1
|
||||||
free_space=1
|
free_space=true
|
||||||
|
|
||||||
permission_mode=0
|
permission_mode=0
|
||||||
filetype_mode=1
|
filetype_mode=1
|
||||||
|
|
||||||
|
horizontal_split=false
|
||||||
|
vertical_equal=true
|
||||||
|
left_panel_size=118
|
||||||
|
horizontal_equal=true
|
||||||
|
top_panel_size=29
|
||||||
|
|
||||||
[Misc]
|
[Misc]
|
||||||
timeformat_recent=%b %e %H:%M
|
timeformat_recent=%b %e %H:%M
|
||||||
timeformat_old=%b %e %Y
|
timeformat_old=%b %e %Y
|
||||||
|
@ -130,6 +147,8 @@ clipboard_paste=
|
||||||
|
|
||||||
find_ignore_dirs=
|
find_ignore_dirs=
|
||||||
|
|
||||||
|
spell_language=en
|
||||||
|
|
||||||
[Colors]
|
[Colors]
|
||||||
base_color=
|
base_color=
|
||||||
screen=
|
screen=
|
||||||
|
@ -143,6 +162,14 @@ linux=
|
||||||
|
|
||||||
screen.rxvt=
|
screen.rxvt=
|
||||||
|
|
||||||
|
xterm-256color=
|
||||||
|
|
||||||
|
screen-256color=
|
||||||
|
|
||||||
|
screen-256color-bce=
|
||||||
|
|
||||||
|
rxvt-unicode-256color=
|
||||||
|
|
||||||
[Panels]
|
[Panels]
|
||||||
kilobyte_si=false
|
kilobyte_si=false
|
||||||
mix_all_files=false
|
mix_all_files=false
|
||||||
|
@ -165,6 +192,13 @@ simple_swap=false
|
||||||
show_mini_info=true
|
show_mini_info=true
|
||||||
torben_fj_mode=false
|
torben_fj_mode=false
|
||||||
|
|
||||||
|
select_flags=6
|
||||||
|
|
||||||
|
panel_scroll_center=false
|
||||||
|
|
||||||
|
[HotlistConfig]
|
||||||
|
expanded_view_of_groups=0
|
||||||
|
|
||||||
[Panelize]
|
[Panelize]
|
||||||
Найти корректуры, отвергнутые командой patch=find . -name \\*.rej -print
|
Найти корректуры, отвергнутые командой patch=find . -name \\*.rej -print
|
||||||
Найти оригиналы (*.orig) после команды patch=find . -name \\*.orig -print
|
Найти оригиналы (*.orig) после команды patch=find . -name \\*.orig -print
|
||||||
|
|
|
@ -1,776 +0,0 @@
|
||||||
# Midnight Commander 3.0 extension file
|
|
||||||
# Warning: Structure of this file has changed completely with version 3.0
|
|
||||||
#
|
|
||||||
# All lines starting with # or empty lines are thrown away.
|
|
||||||
# Lines starting in the first column should have following format:
|
|
||||||
#
|
|
||||||
# keyword/descNL, i.e. everything after keyword/ until new line is desc
|
|
||||||
#
|
|
||||||
# keyword can be:
|
|
||||||
#
|
|
||||||
# shell (desc is, when starting with a dot, any extension (no wildcars),
|
|
||||||
# i.e. matches all the files *desc . Example: .tar matches *.tar;
|
|
||||||
# if it doesn't start with a dot, it matches only a file of that name)
|
|
||||||
#
|
|
||||||
# regex (desc is an extended regular expression)
|
|
||||||
# Please note that we are using the GNU regex library and thus
|
|
||||||
# \| matches the literal | and | has special meaning (or) and
|
|
||||||
# () have special meaning and \( \) stand for literal ( ).
|
|
||||||
#
|
|
||||||
# type (file matches this if `file %f` matches regular expression desc
|
|
||||||
# (the filename: part from `file %f` is removed))
|
|
||||||
#
|
|
||||||
# directory (matches any directory matching regular expression desc)
|
|
||||||
#
|
|
||||||
# include (matches an include directive)
|
|
||||||
#
|
|
||||||
# default (matches any file no matter what desc is)
|
|
||||||
#
|
|
||||||
# Other lines should start with a space or tab and should be in the format:
|
|
||||||
#
|
|
||||||
# keyword=commandNL (with no spaces around =), where keyword should be:
|
|
||||||
#
|
|
||||||
# Open (if the user presses Enter or doubleclicks it),
|
|
||||||
#
|
|
||||||
# View (F3), Edit (F4)
|
|
||||||
#
|
|
||||||
# Include is the keyword used to add any further entries from an include/
|
|
||||||
# section
|
|
||||||
#
|
|
||||||
# command is any one-line shell command, with the following substitutions:
|
|
||||||
#
|
|
||||||
# %% -> % character
|
|
||||||
# %p -> name of the current file (without path, but pwd is its path)
|
|
||||||
# %f -> name of the current file. Unlike %p, if file is located on a
|
|
||||||
# non-local virtual filesystem, i.e. either tarfs, mcfs or ftpfs,
|
|
||||||
# then the file will be temporarily copied into a local directory
|
|
||||||
# and %f will be the full path to this local temporal file.
|
|
||||||
# If you don't want to get a local copy and want to get the
|
|
||||||
# virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then
|
|
||||||
# use %d/%p instead of %f.
|
|
||||||
# %d -> name of the current directory (pwd, without trailing slash)
|
|
||||||
# %s -> "selected files", i.e. space separated list of tagged files if any
|
|
||||||
# or name of the current file
|
|
||||||
# %t -> list of tagged files
|
|
||||||
# %u -> list of tagged files (they'll be untaged after the command)
|
|
||||||
#
|
|
||||||
# (If these 6 letters are in uppercase, they refer to the other panel.
|
|
||||||
# But you shouldn't have to use it in this file.)
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# %cd -> the rest is a path mc should change into (cd won't work, since it's
|
|
||||||
# a child process). %cd handles even vfs names.
|
|
||||||
#
|
|
||||||
# %view -> the command you type will be piped into mc's internal file viewer
|
|
||||||
# if you type only the %view and no command, viewer will load %f file
|
|
||||||
# instead (i.e. no piping, so it is different to %view cat %f)
|
|
||||||
# %view may be directly followed by {} with a list of any of
|
|
||||||
# ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for
|
|
||||||
# text using backspace for bold and underscore) and unform
|
|
||||||
# (no highlighting for nroff sequences) separated by commas.
|
|
||||||
#
|
|
||||||
# %var -> You use it like this: %var{VAR:default}. This macro will expand
|
|
||||||
# to the value of the VAR variable in the environment if it's set
|
|
||||||
# otherwise the value in default will be used. This is similar to
|
|
||||||
# the Bourne shell ${VAR-default} construct.
|
|
||||||
#
|
|
||||||
# Rules are applied from top to bottom, thus the order is important.
|
|
||||||
# If some actions are missing, search continues as if this target didn't
|
|
||||||
# match (i.e. if a file matches the first and second entry and View action
|
|
||||||
# is missing in the first one, then on pressing F3 the View action from
|
|
||||||
# the second entry will be used. default should catch all the actions.
|
|
||||||
#
|
|
||||||
# Any new entries you develop for you are always welcome if they are
|
|
||||||
# useful on more than one system. You can send your modifications
|
|
||||||
# by e-mail to mc-devel@gnome.org
|
|
||||||
|
|
||||||
|
|
||||||
### Changes ###
|
|
||||||
#
|
|
||||||
# Reorganization: 2000-05-01 Michal Svec <rebel@penguin.cz>
|
|
||||||
|
|
||||||
|
|
||||||
### TODO ###
|
|
||||||
#
|
|
||||||
# Postscript Open: ps2svga [gs -DEVICE=jpeg|zgv or something]
|
|
||||||
# Images asciiview
|
|
||||||
#
|
|
||||||
# All X Apps [Nothing/Warning] if no DISPLAY
|
|
||||||
# Not found [Default/Warning]
|
|
||||||
# Empty Output [Default/Warning]
|
|
||||||
# Edit: CopyOut+EDIT+CopyIn
|
|
||||||
# Security Check gzip/bzip EDIT (mktemp)
|
|
||||||
#
|
|
||||||
# Maybe: Open/XOpen/GOpen/KOpen/... for Console/X/GNOME/KDE/etc.
|
|
||||||
|
|
||||||
|
|
||||||
### Archives ###
|
|
||||||
|
|
||||||
# .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk
|
|
||||||
regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$
|
|
||||||
Open=%cd %p/utar://
|
|
||||||
View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
|
|
||||||
|
|
||||||
regex/\.tar\.bz$
|
|
||||||
# Open=%cd %p/utar://
|
|
||||||
View=%view{ascii} bzip -dc %f 2>/dev/null | tar tvvf -
|
|
||||||
|
|
||||||
regex/\.t(ar\.bz2|bz|b2)$
|
|
||||||
Open=%cd %p/utar://
|
|
||||||
View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf -
|
|
||||||
|
|
||||||
# .tar.lzma, .tlz
|
|
||||||
regex/\.t(ar\.lzma|lz)$
|
|
||||||
Open=%cd %p/utar://
|
|
||||||
View=%view{ascii} lzma -dc %f 2>/dev/null | tar tvvf -
|
|
||||||
|
|
||||||
# .tar.xz, .txz
|
|
||||||
regex/\.t(ar\.xz|xz)$
|
|
||||||
Open=%cd %p/utar://
|
|
||||||
View=%view{ascii} xz -dc %f 2>/dev/null | tar tvvf -
|
|
||||||
|
|
||||||
# .tar.F - used in QNX
|
|
||||||
regex/\.tar\.F$
|
|
||||||
# Open=%cd %p/utar://
|
|
||||||
View=%view{ascii} freeze -dc %f 2>/dev/null | tar tvvf -
|
|
||||||
|
|
||||||
# .qpr/.qpk - QNX Neutrino package installer files
|
|
||||||
regex/\.(qp[rk])$
|
|
||||||
Open=%cd %p/utar://
|
|
||||||
View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
|
|
||||||
|
|
||||||
# tar
|
|
||||||
regex/\.(tar|TAR)$
|
|
||||||
Open=%cd %p/utar://
|
|
||||||
View=%view{ascii} tar tvvf - %f
|
|
||||||
|
|
||||||
# lha
|
|
||||||
type/^LHa\ .*archive
|
|
||||||
Open=%cd %p/ulha://
|
|
||||||
View=%view{ascii} lha l %f
|
|
||||||
|
|
||||||
# arj
|
|
||||||
regex/\.a(rj|[0-9][0-9])$
|
|
||||||
Open=%cd %p/uarj://
|
|
||||||
View=%view{ascii} unarj l %f
|
|
||||||
|
|
||||||
# ha
|
|
||||||
regex/\.([Hh][Aa])$
|
|
||||||
Open=%cd %p/uha://
|
|
||||||
View=%view{ascii} ha lf %f
|
|
||||||
|
|
||||||
# rar
|
|
||||||
regex/\.[rR]([aA][rR]|[0-9][0-9])$
|
|
||||||
Open=%cd %p/urar://
|
|
||||||
View=%view{ascii} rar v -c- %f
|
|
||||||
|
|
||||||
# ALZip
|
|
||||||
regex/\.(alz|ALZ)$
|
|
||||||
Open=%cd %p/ualz://
|
|
||||||
View=%view{ascii} unalz -l %f
|
|
||||||
|
|
||||||
# cpio
|
|
||||||
shell/.cpio.Z
|
|
||||||
Open=%cd %p/ucpio://
|
|
||||||
View=%view{ascii} gzip -dc %f | cpio -itv 2>/dev/null
|
|
||||||
|
|
||||||
shell/.cpio.gz
|
|
||||||
Open=%cd %p/ucpio://
|
|
||||||
View=%view{ascii} gzip -dc %f | cpio -itv 2>/dev/null
|
|
||||||
|
|
||||||
shell/.cpio
|
|
||||||
Open=%cd %p/ucpio://
|
|
||||||
View=%view{ascii} cpio -itv < %f 2>/dev/null
|
|
||||||
|
|
||||||
# ls-lR
|
|
||||||
regex/(^|\.)ls-?lR(\.gz|Z|bz2)$
|
|
||||||
Open=%cd %p/lsl://R
|
|
||||||
|
|
||||||
# patch
|
|
||||||
regex/\.(diff|patch)(\.bz2)$
|
|
||||||
Open=%cd %p/patchfs://
|
|
||||||
View=%view{ascii} bzip2 -dc %f 2>/dev/null
|
|
||||||
|
|
||||||
regex/\.(diff|patch)(\.(gz|Z))$
|
|
||||||
Open=%cd %p/patchfs://
|
|
||||||
View=%view{ascii} gzip -dc %f 2>/dev/null
|
|
||||||
|
|
||||||
regex/\.(diff|patch)$
|
|
||||||
Open=%cd %p/patchfs://
|
|
||||||
View=%view{ascii} /bin/cat %f 2>/dev/null
|
|
||||||
|
|
||||||
# ar library
|
|
||||||
regex/\.s?a$
|
|
||||||
Open=%cd %p/uar://
|
|
||||||
#Open=%view{ascii} ar tv %f
|
|
||||||
View=%view{ascii} file %f && nm %f
|
|
||||||
|
|
||||||
# trpm
|
|
||||||
regex/\.trpm$
|
|
||||||
Open=%cd %p/trpm://
|
|
||||||
View=%view{ascii} rpm -qivl --scripts `basename %p .trpm`
|
|
||||||
|
|
||||||
# RPM packages (SuSE uses *.spm for source packages)
|
|
||||||
regex/\.(src\.rpm|spm)$
|
|
||||||
Open=%cd %p/srpm://
|
|
||||||
View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f
|
|
||||||
|
|
||||||
regex/\.rpm$
|
|
||||||
Open=%cd %p/rpm://
|
|
||||||
View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f
|
|
||||||
|
|
||||||
# deb
|
|
||||||
regex/\.u?deb$
|
|
||||||
Open=%cd %p/deb://
|
|
||||||
View=%view{ascii} dpkg-deb -I %f && echo && dpkg-deb -c %f
|
|
||||||
|
|
||||||
# dpkg
|
|
||||||
shell/.debd
|
|
||||||
Open=%cd %p/debd://
|
|
||||||
View=%view{ascii} dpkg -s `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'`
|
|
||||||
# apt
|
|
||||||
shell/.deba
|
|
||||||
Open=%cd %p/deba://
|
|
||||||
View=%view{ascii} apt-cache show `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'`
|
|
||||||
|
|
||||||
# ISO9660
|
|
||||||
regex/\.iso$
|
|
||||||
Open=%cd %p/iso://9660
|
|
||||||
View=%view{ascii} isoinfo -l -i %f
|
|
||||||
|
|
||||||
# 7zip archives (they are not man pages)
|
|
||||||
regex/\.(7z|7Z)$
|
|
||||||
Open=%cd %p/u://7z
|
|
||||||
View=%view{ascii} 7za l %f 2>/dev/null
|
|
||||||
|
|
||||||
# Mailboxes
|
|
||||||
type/^ASCII\ mail\ text
|
|
||||||
Open=%cd %p/mailfs://
|
|
||||||
|
|
||||||
|
|
||||||
### Sources ###
|
|
||||||
|
|
||||||
# C
|
|
||||||
shell/.c
|
|
||||||
#Open=%var{EDITOR:vi} %f
|
|
||||||
Open=(geany %f &>/dev/null)&
|
|
||||||
|
|
||||||
# Fortran
|
|
||||||
shell/.f
|
|
||||||
#Open=%var{EDITOR:vi} %f
|
|
||||||
Open=(geany %f &>/dev/null)&
|
|
||||||
|
|
||||||
# Header
|
|
||||||
regex/\.(h|hpp)$
|
|
||||||
#Open=%var{EDITOR:vi} %f
|
|
||||||
Open=(geany %f &>/dev/null)&
|
|
||||||
|
|
||||||
# Object
|
|
||||||
type/^ELF
|
|
||||||
#Open=%var{PAGER:more} %f
|
|
||||||
View=%view{ascii} file %f && nm %f
|
|
||||||
|
|
||||||
# Asm
|
|
||||||
shell/.s
|
|
||||||
#Open=%var{EDITOR:vi} %f
|
|
||||||
Open=(geany %f &>/dev/null)&
|
|
||||||
|
|
||||||
# C++
|
|
||||||
regex/\.(C|cc|cpp)$
|
|
||||||
#Open=%var{EDITOR:vi} %f
|
|
||||||
Open=(geany %f &>/dev/null)&
|
|
||||||
|
|
||||||
# PAS
|
|
||||||
regex/\.([Pp][Aa][Ss])$
|
|
||||||
#Open=%var{EDITOR:vi} %f
|
|
||||||
Open=(geany %f &>/dev/null)&
|
|
||||||
|
|
||||||
# PERL
|
|
||||||
regex/\.([Pp][Ll])$
|
|
||||||
#Open=%var{EDITOR:vi} %f
|
|
||||||
Open=(geany %f &>/dev/null)&
|
|
||||||
|
|
||||||
# PYTHON
|
|
||||||
regex/\.([Pp][Yy])$
|
|
||||||
#Open=%var{EDITOR:vi} %f
|
|
||||||
Open=(geany %f &>/dev/null)&
|
|
||||||
|
|
||||||
# Java
|
|
||||||
regex/\.([Jj][Aa][Vv][Aa])$
|
|
||||||
#Open=%var{EDITOR:vi} %f
|
|
||||||
Open=(geany %f &>/dev/null)&
|
|
||||||
|
|
||||||
# Baurn's shell
|
|
||||||
regex/\.([Ss][Hh])$
|
|
||||||
#Open=%var{EDITOR:vi} %f
|
|
||||||
Open=(geany %f &>/dev/null)&
|
|
||||||
|
|
||||||
### TXT ###
|
|
||||||
regex/\.([Tt][Xx][Tt])$
|
|
||||||
#Open=%var{EDITOR:vi} %f
|
|
||||||
Open=(geany %f &>/dev/null)&
|
|
||||||
|
|
||||||
### Geany projects ###
|
|
||||||
regex/\.([Gg][Ee][Aa][Nn][Yy])$
|
|
||||||
#Open=%var{EDITOR:vi} %f
|
|
||||||
Open=(geany %f &>/dev/null)&
|
|
||||||
|
|
||||||
### XML ###
|
|
||||||
regex/\.([Xx][Mm][Ll])$
|
|
||||||
Open=(oxygenxml %f &>/dev/null)&
|
|
||||||
|
|
||||||
### Windows's executables ###
|
|
||||||
regex/\.([Ee][Xx][Ee])$
|
|
||||||
#Open=%var{EDITOR:vi} %f
|
|
||||||
Open=(wine %f >/dev/null 2>&1)&
|
|
||||||
|
|
||||||
### Documentation ###
|
|
||||||
|
|
||||||
# Texinfo
|
|
||||||
regex/\.(te?xi|texinfo)$
|
|
||||||
|
|
||||||
# GNU Info page
|
|
||||||
type/^Info\ text
|
|
||||||
Open=info -f %f
|
|
||||||
|
|
||||||
shell/.info
|
|
||||||
Open=info -f %f
|
|
||||||
|
|
||||||
# Manual page
|
|
||||||
# Exception - .so libraries are not manual pages
|
|
||||||
regex/\.(so|so\.[0-9\.]*)$
|
|
||||||
View=%view{ascii} file %f && nm %f
|
|
||||||
|
|
||||||
#regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
|
|
||||||
# Open=case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
|
|
||||||
# View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff -c -Tlatin1 -mandoc ;; esac
|
|
||||||
|
|
||||||
# Perl pod page
|
|
||||||
shell/.pod
|
|
||||||
Open=pod2man %f | nroff -c -Tlatin1 -mandoc | %var{PAGER:more}
|
|
||||||
View=%view{ascii,nroff} pod2man %f | nroff -c -Tlatin1 -mandoc
|
|
||||||
|
|
||||||
# Troff with me macros.
|
|
||||||
# Exception - "read.me" is not a nroff file.
|
|
||||||
shell/read.me
|
|
||||||
Open=
|
|
||||||
View=
|
|
||||||
|
|
||||||
shell/.me
|
|
||||||
Open=nroff -c -Tlatin1 -me %f | %var{PAGER:more}
|
|
||||||
View=%view{ascii,nroff} nroff -c -Tlatin1 -me %f
|
|
||||||
|
|
||||||
# Troff with ms macros.
|
|
||||||
shell/.ms
|
|
||||||
Open=nroff -c -Tlatin1 -ms %f | %var{PAGER:more}
|
|
||||||
View=%view{ascii,nroff} nroff -c -Tlatin1 -ms %f
|
|
||||||
|
|
||||||
# Manual page - compressed
|
|
||||||
regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
|
|
||||||
Open=case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
|
|
||||||
View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac
|
|
||||||
|
|
||||||
regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
|
|
||||||
Open=case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
|
|
||||||
View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac
|
|
||||||
|
|
||||||
regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
|
|
||||||
Open=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
|
|
||||||
View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff -c -Tlatin1 -mandoc ;; esac
|
|
||||||
|
|
||||||
regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
|
|
||||||
Open=case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
|
|
||||||
View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff -c -Tlatin1 -mandoc ;; esac
|
|
||||||
|
|
||||||
regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
|
|
||||||
Open=case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more}
|
|
||||||
View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff -c -Tlatin1 -mandoc ;; esac
|
|
||||||
|
|
||||||
|
|
||||||
### Images ###
|
|
||||||
|
|
||||||
type/^GIF
|
|
||||||
Include=image
|
|
||||||
|
|
||||||
type/^JPEG
|
|
||||||
Include=image
|
|
||||||
|
|
||||||
type/^PC\ bitmap
|
|
||||||
Include=image
|
|
||||||
|
|
||||||
type/^PNG
|
|
||||||
Include=image
|
|
||||||
|
|
||||||
type/^TIFF
|
|
||||||
Include=image
|
|
||||||
|
|
||||||
type/^PBM
|
|
||||||
Include=image
|
|
||||||
|
|
||||||
type/^PGM
|
|
||||||
Include=image
|
|
||||||
|
|
||||||
type/^PPM
|
|
||||||
Include=image
|
|
||||||
|
|
||||||
type/^Netpbm
|
|
||||||
Include=image
|
|
||||||
|
|
||||||
shell/.xcf
|
|
||||||
Open=(gimp %f >dev/null 2>&1 &)
|
|
||||||
|
|
||||||
shell/.xbm
|
|
||||||
Open=bitmap %f
|
|
||||||
|
|
||||||
shell/.xpm
|
|
||||||
Include=image
|
|
||||||
View=sxpm %f
|
|
||||||
shell/.ico
|
|
||||||
Include=image
|
|
||||||
|
|
||||||
regex/\.([Xx][Cc][Ff])$
|
|
||||||
Include=image
|
|
||||||
|
|
||||||
regex/\.([Ss][Vv][Gg])$
|
|
||||||
Include=image
|
|
||||||
|
|
||||||
regex/\.([Pp][Nn][Gg])$
|
|
||||||
Include=image
|
|
||||||
|
|
||||||
regex/\.([Jj][Pp][Gg])$
|
|
||||||
Include=image
|
|
||||||
|
|
||||||
regex/\.([Ss][Vv][Gg][Zz])$
|
|
||||||
Include=image
|
|
||||||
|
|
||||||
include/image
|
|
||||||
Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f >/dev/null 2>&1 &); fi
|
|
||||||
View=%view{ascii} identify %f
|
|
||||||
#View=%view{ascii} asciiview %f
|
|
||||||
Edit=(gimp %f >/dev/null 2>&1)&
|
|
||||||
|
|
||||||
|
|
||||||
# Diagrams
|
|
||||||
regex/\.([Dd][Ii][Aa])$
|
|
||||||
Open=(dia %f &>/dev/null)&
|
|
||||||
|
|
||||||
regex/\.([Vv][Ss][Dd])$
|
|
||||||
Open=(lodraw %f &>/dev/null)&
|
|
||||||
|
|
||||||
### Sound files ###
|
|
||||||
|
|
||||||
regex/\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$
|
|
||||||
# Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
|
|
||||||
Open=mplayer %f
|
|
||||||
|
|
||||||
regex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$
|
|
||||||
Open=mikmod %f
|
|
||||||
#Open=tracker %f
|
|
||||||
|
|
||||||
regex/\.([wW][aA][wW]22)$
|
|
||||||
# Open=vplay -s 22 %f
|
|
||||||
Open=mplayer %f
|
|
||||||
|
|
||||||
regex/\.([mM][pP]3)$
|
|
||||||
# Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
|
|
||||||
Open=mplayer %f
|
|
||||||
View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
|
|
||||||
|
|
||||||
regex/\.([oO][gG][gG|aA|vV|xX])$
|
|
||||||
# Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
|
|
||||||
Open=mplayer %f
|
|
||||||
View=%view{ascii} ogginfo %s
|
|
||||||
|
|
||||||
regex/\.([sS][pP][xX]|[fF][lL][aA][cC])$
|
|
||||||
Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
|
|
||||||
|
|
||||||
regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$
|
|
||||||
Open=timidity %f
|
|
||||||
|
|
||||||
regex/\.([wW][mM][aA])$
|
|
||||||
# Open=mplayer -vo null %f
|
|
||||||
Open=mplayer %f
|
|
||||||
View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | tail +13 || file %f
|
|
||||||
|
|
||||||
|
|
||||||
### Play lists ###
|
|
||||||
|
|
||||||
regex/\.([mM]3[uU]|[pP][lL][sS])$
|
|
||||||
Open=if [ -z "$DISPLAY" ]; then mplayer -vo null -playlist %f; else (xmms -p %f >/dev/null 2>&1 &); fi
|
|
||||||
|
|
||||||
|
|
||||||
### Video ###
|
|
||||||
|
|
||||||
regex/\.([aA][vV][iI])$
|
|
||||||
Include=video
|
|
||||||
|
|
||||||
regex/\.([aA][sS][fFxX])$
|
|
||||||
Include=video
|
|
||||||
|
|
||||||
regex/\.([dD][iI][vV][xX])$
|
|
||||||
Include=video
|
|
||||||
|
|
||||||
regex/\.([mM][oO][vV]|[qQ][tT])$
|
|
||||||
Include=video
|
|
||||||
|
|
||||||
regex/\.([mM][pP]4|[mM][pP][eE]?[gG])$
|
|
||||||
Include=video
|
|
||||||
|
|
||||||
regex/\.([vV][oO][bB])$
|
|
||||||
Include=video
|
|
||||||
|
|
||||||
regex/\.([wW][mM][vV])$
|
|
||||||
Include=video
|
|
||||||
|
|
||||||
regex/\.([fF][lL][iIcCvV])$
|
|
||||||
Include=video
|
|
||||||
|
|
||||||
regex/\.([oO][gG][mM])$
|
|
||||||
Include=video
|
|
||||||
|
|
||||||
regex/\.([Mm][Kk][Vv])$
|
|
||||||
Include=video
|
|
||||||
|
|
||||||
regex/\.([rR][aA]?[mM])$
|
|
||||||
Open=(realplay %f >/dev/null 2>&1 &)
|
|
||||||
|
|
||||||
regex/\.([mM]4[vV])$
|
|
||||||
Include=video
|
|
||||||
|
|
||||||
regex/\.([3][Gg][Pp])$
|
|
||||||
Include=video
|
|
||||||
|
|
||||||
include/video
|
|
||||||
Open=(mplayer %f &>/dev/null)&
|
|
||||||
Edit=mplayer -fs %f
|
|
||||||
#Edit=echo %p
|
|
||||||
#View=echo "%d/%p"|cut -d# -f2|sed s/:/':\/\/'/
|
|
||||||
#Open=(gtv %f >/dev/null 2>&1 &)
|
|
||||||
#Open=(xanim %f >/dev/null 2>&1 &)
|
|
||||||
|
|
||||||
|
|
||||||
### Documents ###
|
|
||||||
|
|
||||||
# Postscript
|
|
||||||
type/^PostScript
|
|
||||||
#Open=(gv %f &)
|
|
||||||
Open=(evince %f &>/dev/null)&
|
|
||||||
View=%view{ascii} ps2ascii %f
|
|
||||||
|
|
||||||
# PDF
|
|
||||||
type/^PDF
|
|
||||||
#Open=(xpdf %f &)
|
|
||||||
Open=(evince %f &>/dev/null)&
|
|
||||||
#Open=(acroread %f &)
|
|
||||||
#Open=(ghostview %f &)
|
|
||||||
View=%view{ascii} pdftotext %f -
|
|
||||||
|
|
||||||
# DJVU
|
|
||||||
regex/\.([Dd][Jj][Vv][Uu])$
|
|
||||||
Open=(evince %f &>/dev/null)&
|
|
||||||
regex/\.([Dd][Jj][Vv])$
|
|
||||||
Open=(evince %f &>/dev/null)&
|
|
||||||
|
|
||||||
# CHM
|
|
||||||
regex/\.([Cc][Hh][Mm])$
|
|
||||||
Open=(chmsee %f >/dev/null 2>&1 &)
|
|
||||||
|
|
||||||
# Maple
|
|
||||||
regex/\.([Mm][Ww][Ss]|[Mm][Ww])$
|
|
||||||
Open=(xmaple %f >/dev/null 2>&1)&
|
|
||||||
|
|
||||||
# LabView file
|
|
||||||
regex/\.([Vv][Ii])$
|
|
||||||
Open=(labview-8.6 %f >/dev/null 2>&1)&
|
|
||||||
|
|
||||||
regex/\.([Ll][Vv][Pp][Rr][Oo][Jj])$
|
|
||||||
Open=(labview-8.6 %f >/dev/null 2>&1)&
|
|
||||||
|
|
||||||
# The following code very ugly and should not be taken as example.
|
|
||||||
# It should be cleaned up when the new format of mc.ext is developed.
|
|
||||||
|
|
||||||
# html
|
|
||||||
regex/\.([hH][tT][mM][lL]?)$
|
|
||||||
#Open=(if test -n "" && test -n "$DISPLAY"; then ( file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null
|
|
||||||
Open=(firefox %f &)
|
|
||||||
View=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f
|
|
||||||
Edit=(geany %f &>/dev/null 2>&1 &)
|
|
||||||
|
|
||||||
# htm
|
|
||||||
regex/\.([hH][tT][mM]?)$
|
|
||||||
#Open=(if test -n "" && test -n "$DISPLAY"; then ( file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null
|
|
||||||
Open=(firefox %f &)
|
|
||||||
View=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f
|
|
||||||
Edit=(geany %f &>/dev/null 2>&1 &)
|
|
||||||
# swf
|
|
||||||
regex/\.([Ss][Ww][Ff]?)$
|
|
||||||
Open=(firefox %f >/dev/null 2)&
|
|
||||||
|
|
||||||
# StarOffice 5.2
|
|
||||||
shell/.sdw
|
|
||||||
Open=(lobase %f >/dev/null 2>&1)&
|
|
||||||
|
|
||||||
# StarOffice 6 and OpenOffice.org formats
|
|
||||||
regex/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
|
|
||||||
Open=(lobase %f >/dev/null 2>&1)&
|
|
||||||
View=%view{ascii} odt2txt %f
|
|
||||||
|
|
||||||
# OpenOffice presentaion documents
|
|
||||||
regex/\.([Pp][Pp][Tt])$
|
|
||||||
Open=(loimpress %f >/dev/null 2>&1)&
|
|
||||||
|
|
||||||
# AbiWord
|
|
||||||
shell/.abw
|
|
||||||
Open=(abiword %f &)
|
|
||||||
|
|
||||||
# Microsoft Word Document
|
|
||||||
regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
|
|
||||||
#Open=(abiword %f >/dev/null 2>&1 &)
|
|
||||||
Open=(lobase %f >/dev/null 2>&1)&
|
|
||||||
View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
|
|
||||||
type/^Microsoft\ Word
|
|
||||||
#Open=(abiword %f >/dev/null 2>&1 &)
|
|
||||||
Open=(lobase %f >/dev/null 2>&1)&
|
|
||||||
View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
|
|
||||||
|
|
||||||
# RTF document
|
|
||||||
regex/\.([rR][tT][fF])$
|
|
||||||
#Open=(abiword %f >/dev/null 2>&1 &)
|
|
||||||
Open=(lobase %f >/dev/null 2>&1)&
|
|
||||||
|
|
||||||
# Microsoft Excel Worksheet
|
|
||||||
regex/\.([xX][lL][sSwW])$
|
|
||||||
#Open=(gnumeric %f >/dev/null 2>&1 &)
|
|
||||||
Open=(lobase %f >/dev/null 2>&1)&
|
|
||||||
View=%view{ascii} xls2csv %f || strings %f
|
|
||||||
type/^Microsoft\ Excel
|
|
||||||
#Open=(gnumeric %f >/dev/null 2>&1 &)
|
|
||||||
Open=(lobase %f >/dev/null 2>&1)&
|
|
||||||
View=%view{ascii} xls2csv %f || strings %f
|
|
||||||
|
|
||||||
# Use OpenOffice.org to open any MS Office documents
|
|
||||||
type/^Microsoft\ Office\ Document
|
|
||||||
Open=(lobase %f >/dev/null 2>&1)&
|
|
||||||
|
|
||||||
# Framemaker
|
|
||||||
type/^FrameMaker
|
|
||||||
Open=fmclient -f %f
|
|
||||||
|
|
||||||
# DVI
|
|
||||||
regex/\.([dD][vV][iI])$
|
|
||||||
#Open=if [ x$DISPLAY = x ]; then dvisvga %f; else (evince %f &); fi
|
|
||||||
View=%view{ascii} dvi2tty %f
|
|
||||||
|
|
||||||
# TeX
|
|
||||||
regex/\.([Tt][Ee][Xx])$
|
|
||||||
Open=%var{EDITOR:vi} %f
|
|
||||||
|
|
||||||
# Lyx
|
|
||||||
regex/\.([Ll][Yy][Xx])$
|
|
||||||
Open=(lyx %f &>/dev/null)&
|
|
||||||
|
|
||||||
### Miscellaneous ###
|
|
||||||
|
|
||||||
# Makefile
|
|
||||||
regex/[Mm]akefile$
|
|
||||||
Open=make -f %f %{Enter parameters}
|
|
||||||
|
|
||||||
# Imakefile
|
|
||||||
shell/Imakefile
|
|
||||||
Open=xmkmf -a
|
|
||||||
|
|
||||||
# Makefile.PL (MakeMaker)
|
|
||||||
regex/^Makefile.(PL|pl)$
|
|
||||||
Open=%var{PERL:perl} %f
|
|
||||||
|
|
||||||
# dbf
|
|
||||||
regex/\.([dD][bB][fF])$
|
|
||||||
Open=%view{ascii} dbview %f
|
|
||||||
View=%view{ascii} dbview -b %f
|
|
||||||
|
|
||||||
# REXX script
|
|
||||||
regex/\.(rexx?|cmd)$
|
|
||||||
Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
|
|
||||||
|
|
||||||
# Disk images for Commodore computers (VIC20, C64, C128)
|
|
||||||
regex/\.(d64|D64)$
|
|
||||||
Open=%cd %p/uc://1541
|
|
||||||
View=%view{ascii} c1541 %f -list
|
|
||||||
Extract=c1541 %f -extract
|
|
||||||
|
|
||||||
# Glade, a user interface designer for GTK+ and GNOME
|
|
||||||
regex/\.([Gg][Ll][Aa][Dd][Ee])$
|
|
||||||
Open=if glade-3 --version >/dev/null 2>&1; then (glade-3 %f >/dev/null 2>&1 &); else (glade-2 %f >/dev/null 2>&1 &); fi
|
|
||||||
|
|
||||||
|
|
||||||
### Plain compressed files ###
|
|
||||||
|
|
||||||
# ace
|
|
||||||
regex/\.(ace|ACE)$
|
|
||||||
Open=%cd %p/uace://
|
|
||||||
View=%view{ascii} unace l %f
|
|
||||||
Extract=unace x %f
|
|
||||||
|
|
||||||
# arc
|
|
||||||
regex/\.(arc|ARC)$
|
|
||||||
Open=%cd %p/uarc://
|
|
||||||
View=%view{ascii} arc l %f
|
|
||||||
Extract=arc x %f '*'
|
|
||||||
Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi
|
|
||||||
|
|
||||||
# zip
|
|
||||||
type/^([Zz][Ii][Pp])\ archive
|
|
||||||
Open=%cd %p/uzip://
|
|
||||||
View=%view{ascii} unzip -v %f
|
|
||||||
|
|
||||||
# zoo
|
|
||||||
regex/\.([Zz][Oo][Oo])$
|
|
||||||
Open=%cd %p/uzoo://
|
|
||||||
View=%view{ascii} zoo l %f
|
|
||||||
|
|
||||||
# gzip
|
|
||||||
type/^gzip
|
|
||||||
Open=gzip -dc %f | %var{PAGER:more}
|
|
||||||
View=%view{ascii} gzip -dc %f 2>/dev/null
|
|
||||||
|
|
||||||
regex/\.(gz|Z)?$
|
|
||||||
View=%view{ascii} gzip -dc %f 2>/dev/null
|
|
||||||
|
|
||||||
# bzip2
|
|
||||||
type/^bzip2
|
|
||||||
Open=bzip2 -dc %f | %var{PAGER:more}
|
|
||||||
View=%view{ascii} bzip2 -dc %f 2>/dev/null
|
|
||||||
|
|
||||||
regex/\.bz2?$
|
|
||||||
View=%view{ascii} bzip2 -dc %f 2>/dev/null
|
|
||||||
|
|
||||||
# bzip
|
|
||||||
type/^bzip
|
|
||||||
Open=bzip -dc %f | %var{PAGER:more}
|
|
||||||
View=%view{ascii} bzip -dc %f 2>/dev/null
|
|
||||||
|
|
||||||
# compress
|
|
||||||
type/^compress
|
|
||||||
Open=gzip -dc %f | %var{PAGER:more}
|
|
||||||
View=%view{ascii} gzip -dc %f 2>/dev/null
|
|
||||||
|
|
||||||
# lzma
|
|
||||||
regex/\.lzma$
|
|
||||||
Open=lzma -dc %f | %var{PAGER:more}
|
|
||||||
View=%view{ascii} lzma -dc %f 2>/dev/null
|
|
||||||
|
|
||||||
# xz
|
|
||||||
regex/\.xz$
|
|
||||||
Open=xz -dc %f | %var{PAGER:more}
|
|
||||||
View=%view{ascii} xz -dc %f 2>/dev/null
|
|
||||||
|
|
||||||
|
|
||||||
### Default ###
|
|
||||||
|
|
||||||
# Default target for anything not described above
|
|
||||||
default/*
|
|
||||||
Open=
|
|
||||||
View=
|
|
||||||
|
|
||||||
|
|
||||||
### EOF ###
|
|
|
@ -1 +1,36 @@
|
||||||
|
|
||||||
|
[New Left Panel]
|
||||||
|
display=listing
|
||||||
|
reverse=false
|
||||||
|
case_sensitive=true
|
||||||
|
exec_first=false
|
||||||
|
sort_order=name
|
||||||
|
list_mode=full
|
||||||
|
brief_cols=2
|
||||||
|
user_format=half type name | size | perm
|
||||||
|
user_status0=half type name | size | perm
|
||||||
|
user_status1=half type name | size | perm
|
||||||
|
user_status2=half type name | size | perm
|
||||||
|
user_status3=half type name | size | perm
|
||||||
|
user_mini_status=false
|
||||||
|
list_format=full
|
||||||
|
|
||||||
|
[New Right Panel]
|
||||||
|
display=listing
|
||||||
|
reverse=false
|
||||||
|
case_sensitive=true
|
||||||
|
exec_first=false
|
||||||
|
sort_order=name
|
||||||
|
list_mode=full
|
||||||
|
brief_cols=2
|
||||||
|
user_format=half type name | size | perm
|
||||||
|
user_status0=half type name | size | perm
|
||||||
|
user_status1=half type name | size | perm
|
||||||
|
user_status2=half type name | size | perm
|
||||||
|
user_status3=half type name | size | perm
|
||||||
|
user_mini_status=false
|
||||||
|
list_format=full
|
||||||
|
|
||||||
|
[Dirs]
|
||||||
|
current_is_left=false
|
||||||
|
other_dir=/home/kolan
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
# Write your default config options here!
|
||||||
|
[default]
|
||||||
|
stop-screensaver="yes"
|
||||||
|
#heartbeat-cmd="xscreensaver-command -deactivate &"
|
||||||
|
|
||||||
|
save-position-on-quit=yes
|
||||||
|
#subcp=enca:ru:utf8
|
||||||
|
#hwdec=vaapi
|
||||||
|
#hwdec=vdpau
|
||||||
|
#fullscreen=yes
|
||||||
|
vo=gpu
|
||||||
|
|
||||||
|
#osd-status-msg=${playback-time/full} / ${duration} (${percent-pos}%)\nframe: ${estimated-frame-number} / ${estimated-frame-count}
|
|
@ -0,0 +1,4 @@
|
||||||
|
Esc quit
|
||||||
|
Enter quit
|
||||||
|
WHEEL_UP seek 1
|
||||||
|
WHEEL_DOWN seek -1
|
|
@ -0,0 +1,97 @@
|
||||||
|
###
|
||||||
|
# [TypeNameOfPlugin]
|
||||||
|
# Disabled: Set to true to avoid loading the plugin. By default all
|
||||||
|
# plugins are loaded.
|
||||||
|
# Priority: Priority of the plugin if more plugins support the same
|
||||||
|
# uri-scheme / mime-type combination.
|
||||||
|
# Locations: ;-separated path list the plugin will be used in. If the
|
||||||
|
# source file is not a child of one of the locations, the
|
||||||
|
# plugin won't be used and another plugin with a lower
|
||||||
|
# priority will be tried.
|
||||||
|
# Absolute paths, environement variables, ~/ and ~username/
|
||||||
|
# are allowed. Leave empty to allow all locations.
|
||||||
|
# MaxFileSize: Maximum size of the source file the plugin will still
|
||||||
|
# try to generate a plugin for. The size is in bytes,
|
||||||
|
# 0 disabled the check.
|
||||||
|
#
|
||||||
|
# For more information see http://docs.xfce.org/xfce/thunar/tumbler
|
||||||
|
###
|
||||||
|
|
||||||
|
###
|
||||||
|
# Image Thumbnailers
|
||||||
|
###
|
||||||
|
|
||||||
|
# Jpeg thumbnailer (from exif data if possible)
|
||||||
|
[JPEGThumbnailer]
|
||||||
|
Disabled=false
|
||||||
|
Priority=3
|
||||||
|
Locations=
|
||||||
|
MaxFileSize=0
|
||||||
|
|
||||||
|
# Supports all type GdkPixbuf supports
|
||||||
|
[PixbufThumbnailer]
|
||||||
|
Disabled=false
|
||||||
|
Priority=2
|
||||||
|
Locations=
|
||||||
|
MaxFileSize=0
|
||||||
|
|
||||||
|
# RAW image files using libopenraw
|
||||||
|
[RawThumbnailer]
|
||||||
|
Disabled=false
|
||||||
|
Priority=1
|
||||||
|
Locations=
|
||||||
|
MaxFileSize=0
|
||||||
|
|
||||||
|
###
|
||||||
|
# Video Thumbnailers
|
||||||
|
###
|
||||||
|
|
||||||
|
# Download cover from omdbapi.com or themoviedb.org if an
|
||||||
|
# API key is given. This plugin is disabled because it
|
||||||
|
# sends your (private) movie names over the internet.
|
||||||
|
[CoverThumbnailer]
|
||||||
|
Disabled=true
|
||||||
|
Priority=3
|
||||||
|
Locations=~/movies
|
||||||
|
MaxFileSize=0
|
||||||
|
#APIKey=your-api-key-from-themoviedb.org
|
||||||
|
|
||||||
|
# ffmpegthumbnailer plugin
|
||||||
|
[FfmegThumbnailer]
|
||||||
|
Disabled=false
|
||||||
|
Priority=2
|
||||||
|
Locations=
|
||||||
|
MaxFileSize=0
|
||||||
|
|
||||||
|
# GStreamer plugin
|
||||||
|
[GstThumbnailer]
|
||||||
|
Disabled=true
|
||||||
|
Priority=1
|
||||||
|
Locations=
|
||||||
|
MaxFileSize=0
|
||||||
|
|
||||||
|
###
|
||||||
|
# Other Thumbnailers
|
||||||
|
###
|
||||||
|
|
||||||
|
# FreeType thumbnailer
|
||||||
|
[FontThumbnailer]
|
||||||
|
Disabled=false
|
||||||
|
Priority=1
|
||||||
|
Locations=
|
||||||
|
MaxFileSize=0
|
||||||
|
|
||||||
|
|
||||||
|
# PDF/PS thumbnailer
|
||||||
|
[PopplerThumbnailer]
|
||||||
|
Disabled=false
|
||||||
|
Priority=1
|
||||||
|
Locations=
|
||||||
|
MaxFileSize=0
|
||||||
|
|
||||||
|
# Open document thumbnailer (ODF)
|
||||||
|
[OdfThumbnailer]
|
||||||
|
Disabled=false
|
||||||
|
Priority=1
|
||||||
|
Locations=
|
||||||
|
MaxFileSize=0
|
|
@ -0,0 +1,8 @@
|
||||||
|
XDG_DESKTOP_DIR="$HOME/.big/tmp/desktop/"
|
||||||
|
XDG_DOCUMENTS_DIR="$HOME/.big/tmp/documents"
|
||||||
|
XDG_MUSIC_DIR="$HOME/.big/tmp/music"
|
||||||
|
XDG_PICTURES_DIR="$HOME/.big/tmp/pictures"
|
||||||
|
XDG_VIDEOS_DIR="$HOME/.big/tmp/videos"
|
||||||
|
XDG_DOWNLOAD_DIR="$HOME/.big/download"
|
||||||
|
XDG_TEMPLATES_DIR="$HOME/.big/templates"
|
||||||
|
XDG_PUBLICSHARE_DIR="$HOME/.big/shares"
|
|
@ -0,0 +1,764 @@
|
||||||
|
# Terminals {{{
|
||||||
|
TERM Eterm
|
||||||
|
TERM ansi
|
||||||
|
TERM color-xterm
|
||||||
|
TERM con132x25
|
||||||
|
TERM con132x30
|
||||||
|
TERM con132x43
|
||||||
|
TERM con132x60
|
||||||
|
TERM con80x25
|
||||||
|
TERM con80x28
|
||||||
|
TERM con80x30
|
||||||
|
TERM con80x43
|
||||||
|
TERM con80x50
|
||||||
|
TERM con80x60
|
||||||
|
TERM cons25
|
||||||
|
TERM console
|
||||||
|
TERM cygwin
|
||||||
|
TERM dtterm
|
||||||
|
TERM eterm-color
|
||||||
|
TERM gnome
|
||||||
|
TERM gnome-256color
|
||||||
|
TERM jfbterm
|
||||||
|
TERM konsole
|
||||||
|
TERM kterm
|
||||||
|
TERM linux
|
||||||
|
TERM linux-c
|
||||||
|
TERM mach-color
|
||||||
|
TERM mlterm
|
||||||
|
TERM putty
|
||||||
|
TERM rxvt
|
||||||
|
TERM rxvt-256color
|
||||||
|
TERM rxvt-cygwin
|
||||||
|
TERM rxvt-cygwin-native
|
||||||
|
TERM rxvt-unicode
|
||||||
|
TERM rxvt-unicode-256color
|
||||||
|
TERM rxvt-unicode256
|
||||||
|
TERM screen
|
||||||
|
TERM screen-256color
|
||||||
|
TERM screen-256color-bce
|
||||||
|
TERM screen-bce
|
||||||
|
TERM screen-w
|
||||||
|
TERM screen.Eterm
|
||||||
|
TERM screen.rxvt
|
||||||
|
TERM screen.linux
|
||||||
|
TERM st
|
||||||
|
TERM st-256color
|
||||||
|
TERM terminator
|
||||||
|
TERM vt100
|
||||||
|
TERM xterm
|
||||||
|
TERM xterm-16color
|
||||||
|
TERM xterm-256color
|
||||||
|
TERM xterm-88color
|
||||||
|
TERM xterm-color
|
||||||
|
TERM xterm-debian
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
# Help on colors {{{
|
||||||
|
# Attr: 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
|
||||||
|
# Text: 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
|
||||||
|
# 256c: 38;5;0-255
|
||||||
|
# Back: 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
|
||||||
|
# 256c: 48;5;0-255 }}}
|
||||||
|
|
||||||
|
# Special files {{{
|
||||||
|
#NORMAL 00 # no color code at all
|
||||||
|
#FILE 00 # regular file: use no color at all
|
||||||
|
RESET 0 # reset to "normal" color
|
||||||
|
DIR 01;34 # directory
|
||||||
|
# LINK target # symbolic link.
|
||||||
|
LINK 01;36 # symbolic link.
|
||||||
|
MULTIHARDLINK 48;5;188 # regular file with more than one link
|
||||||
|
FIFO 01;45;37 # pipe
|
||||||
|
SOCK 01;45;36 # socket
|
||||||
|
DOOR 01;35 # door
|
||||||
|
BLK 01;43;33 # block device driver
|
||||||
|
CHR 01;46;33 # character device driver
|
||||||
|
ORPHAN 01;05;37;41 # orphaned syminks
|
||||||
|
MISSING 01;05;37;41 # ... and the files they point to
|
||||||
|
SETUID 37;41 # file that is setuid (u+s)
|
||||||
|
SETGID 30;43 # file that is setgid (g+s)
|
||||||
|
CAPABILITY 30;41 # file with capability
|
||||||
|
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
|
||||||
|
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
|
||||||
|
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
|
||||||
|
EXEC 01;32 # This is for files with execute permission:
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
# Vim-editable: code, text, etc... {{{
|
||||||
|
.alias 36
|
||||||
|
.ALIAS 36
|
||||||
|
.allow 36
|
||||||
|
.ALLOW 36
|
||||||
|
.am 36
|
||||||
|
.AM 36
|
||||||
|
.awk 36
|
||||||
|
.AWK 36
|
||||||
|
.ascii 36
|
||||||
|
.ASCII 36
|
||||||
|
.asm 36
|
||||||
|
.ASM 36
|
||||||
|
.bash 36
|
||||||
|
.BASH 36
|
||||||
|
.bashrc 36
|
||||||
|
.BASHRC 36
|
||||||
|
.bat 36
|
||||||
|
.BAT 36
|
||||||
|
.bff 36
|
||||||
|
.BFF 36
|
||||||
|
.c 36
|
||||||
|
.C 36
|
||||||
|
.c++ 36
|
||||||
|
.C++ 36
|
||||||
|
.cat 36
|
||||||
|
.CAT 36
|
||||||
|
.cc 36
|
||||||
|
.CC 36
|
||||||
|
.cert 36
|
||||||
|
.CERT 36
|
||||||
|
.cfg 36
|
||||||
|
.CFG 36
|
||||||
|
.cgi 36
|
||||||
|
.CGI 36
|
||||||
|
.cgl 36
|
||||||
|
.CGL 36
|
||||||
|
.cl 36
|
||||||
|
.CL 36
|
||||||
|
.cmake 36
|
||||||
|
.CMAKE 36
|
||||||
|
.cmd 36
|
||||||
|
.CMD 36
|
||||||
|
.cnf 36
|
||||||
|
.CNF 36
|
||||||
|
.conf 36
|
||||||
|
.CONF 36
|
||||||
|
.cpp 36
|
||||||
|
.CPP 36
|
||||||
|
.crc 36
|
||||||
|
.CRC 36
|
||||||
|
.crt 36
|
||||||
|
.CRT 36
|
||||||
|
.csh 36
|
||||||
|
.CSH 36
|
||||||
|
.csp 36
|
||||||
|
.CSP 36
|
||||||
|
.csr 36
|
||||||
|
.CSR 36
|
||||||
|
.css 36
|
||||||
|
.CSS 36
|
||||||
|
.csv 36
|
||||||
|
.CSV 36
|
||||||
|
.cu 36
|
||||||
|
.CU 36
|
||||||
|
.cxx 36
|
||||||
|
.CXX 36
|
||||||
|
.def 36
|
||||||
|
.DEF 36
|
||||||
|
.defs 36
|
||||||
|
.DEFS 36
|
||||||
|
.dep 36
|
||||||
|
.DEP 36
|
||||||
|
.desc 36
|
||||||
|
.DESC 36
|
||||||
|
.daily 36
|
||||||
|
.DAILY 36
|
||||||
|
.deny 36
|
||||||
|
.DENY 36
|
||||||
|
.diff 36
|
||||||
|
.DIFF 36
|
||||||
|
.diz 36
|
||||||
|
.DIZ 36
|
||||||
|
.ebuild 36
|
||||||
|
.EBUILD 36
|
||||||
|
.emacs 36
|
||||||
|
.EMACS 36
|
||||||
|
.env 36
|
||||||
|
.ENV 36
|
||||||
|
.exim 36
|
||||||
|
.EXIM 36
|
||||||
|
.fcgi 36
|
||||||
|
.FCGI 36
|
||||||
|
.geany 36
|
||||||
|
.GEANY 36
|
||||||
|
.h 36
|
||||||
|
.H 36
|
||||||
|
.hh 36
|
||||||
|
.HH 36
|
||||||
|
.hpp 36
|
||||||
|
.HPP 36
|
||||||
|
.htm 36
|
||||||
|
.HTM 36
|
||||||
|
.html 36
|
||||||
|
.HTML 36
|
||||||
|
.hourly 36
|
||||||
|
.HOURLY 36
|
||||||
|
.in 36
|
||||||
|
.IN 36
|
||||||
|
.inc 36
|
||||||
|
.INC 36
|
||||||
|
.inf 36
|
||||||
|
.INF 36
|
||||||
|
.info 36
|
||||||
|
.INFO 36
|
||||||
|
.ini 36
|
||||||
|
.INI 36
|
||||||
|
.java 36
|
||||||
|
.JAVA 36
|
||||||
|
.jhtm 36
|
||||||
|
.JHTM 36
|
||||||
|
.js 36
|
||||||
|
.JS 36
|
||||||
|
.latex 36
|
||||||
|
.LATEX 36
|
||||||
|
.layout 36
|
||||||
|
.LAYOUT 36
|
||||||
|
.lex 36
|
||||||
|
.LEX 36
|
||||||
|
.lisp 36
|
||||||
|
.LISP 36
|
||||||
|
.list 36
|
||||||
|
.LIST 36
|
||||||
|
.log 36
|
||||||
|
.LOG 36
|
||||||
|
.lst 36
|
||||||
|
.LST 36
|
||||||
|
.lua 36
|
||||||
|
.LUA 36
|
||||||
|
.make 36
|
||||||
|
.MAKE 36
|
||||||
|
.monthly 36
|
||||||
|
.MONTHLY 36
|
||||||
|
.out 36
|
||||||
|
.OUT 36
|
||||||
|
.pas 36
|
||||||
|
.PAS 36
|
||||||
|
.patch 36
|
||||||
|
.PATCH 36
|
||||||
|
.pc 36
|
||||||
|
.PC 36
|
||||||
|
.pem 36
|
||||||
|
.PEM 36
|
||||||
|
.perl 36
|
||||||
|
.PERL 36
|
||||||
|
.php 36
|
||||||
|
.PHP 36
|
||||||
|
.pl 36
|
||||||
|
.PL 36
|
||||||
|
.po 36
|
||||||
|
.PO 36
|
||||||
|
.pot 36
|
||||||
|
.POT 36
|
||||||
|
.py 36
|
||||||
|
.PY 36
|
||||||
|
.rb 36
|
||||||
|
.RB 36
|
||||||
|
.rc 36
|
||||||
|
.RC 36
|
||||||
|
.reg 36
|
||||||
|
.REG 36
|
||||||
|
.rhtml 36
|
||||||
|
.RHTML 36
|
||||||
|
.rsp 36
|
||||||
|
.RSP 36
|
||||||
|
.ruby 36
|
||||||
|
.RUBY 36
|
||||||
|
.sed 36
|
||||||
|
.SED 36
|
||||||
|
.sgml 36
|
||||||
|
.SGML 36
|
||||||
|
.sh 36
|
||||||
|
.SH 36
|
||||||
|
.sql 36
|
||||||
|
.SQL 36
|
||||||
|
.src 36
|
||||||
|
.SRC 36
|
||||||
|
.sty 36
|
||||||
|
.STY 36
|
||||||
|
.style 36
|
||||||
|
.STYLE 36
|
||||||
|
.tcc 36
|
||||||
|
.TCC 36
|
||||||
|
.tcsh 36
|
||||||
|
.TCSH 36
|
||||||
|
.tcl 36
|
||||||
|
.TCL 36
|
||||||
|
.tex 36
|
||||||
|
.TEX 36
|
||||||
|
.text 36
|
||||||
|
.TEXT 36
|
||||||
|
.txt 36
|
||||||
|
.TXT 36
|
||||||
|
.vala 36
|
||||||
|
.VALA 36
|
||||||
|
.vapi 36
|
||||||
|
.VAPI 36
|
||||||
|
.vb 36
|
||||||
|
.VB 36
|
||||||
|
.vbi 36
|
||||||
|
.VBI 36
|
||||||
|
.vim 36
|
||||||
|
.VIM 36
|
||||||
|
.weekly 36
|
||||||
|
.WEEKLY 36
|
||||||
|
.wsgi 36
|
||||||
|
.WSGI 36
|
||||||
|
.xml 36
|
||||||
|
.XML 36
|
||||||
|
.xhtm 36
|
||||||
|
.XHTM 36
|
||||||
|
.xhtml 36
|
||||||
|
.XHTML 36
|
||||||
|
.yml 36
|
||||||
|
.YML 36
|
||||||
|
.yaml 36
|
||||||
|
.YAML 36
|
||||||
|
.zh 36
|
||||||
|
.ZH 36
|
||||||
|
.zsh 36
|
||||||
|
.ZSH 36
|
||||||
|
.zshrc 36
|
||||||
|
.ZSHRC 36
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# Pictures and icons {{{
|
||||||
|
.ani 01;31
|
||||||
|
.ANI 01;31
|
||||||
|
.bmp 01;31
|
||||||
|
.BMP 01;31
|
||||||
|
.cdr 01;31
|
||||||
|
.CDR 01;31
|
||||||
|
.cur 01;31
|
||||||
|
.CUR 01;31
|
||||||
|
.eps 01;31
|
||||||
|
.EPS 01;31
|
||||||
|
.gif 01;31
|
||||||
|
.GIF 01;31
|
||||||
|
.ico 01;31
|
||||||
|
.ICO 01;31
|
||||||
|
.jpg 01;31
|
||||||
|
.JPG 01;31
|
||||||
|
.jpeg 01;31
|
||||||
|
.JPEG 01;31
|
||||||
|
.mng 01;31
|
||||||
|
.MNG 01;31
|
||||||
|
.pcx 01;31
|
||||||
|
.PCX 01;31
|
||||||
|
.pic 01;31
|
||||||
|
.PIC 01;31
|
||||||
|
.png 01;31
|
||||||
|
.PNG 01;31
|
||||||
|
.ppm 01;31
|
||||||
|
.PPM 01;31
|
||||||
|
.rgb 01;31
|
||||||
|
.RGB 01;31
|
||||||
|
.svg 01;31
|
||||||
|
.SVG 01;31
|
||||||
|
.svgz 01;31
|
||||||
|
.SVGZ 01;31
|
||||||
|
.tif 01;31
|
||||||
|
.TIF 01;31
|
||||||
|
.tiff 01;31
|
||||||
|
.TIFF 01;31
|
||||||
|
.xbm 01;31
|
||||||
|
.XBM 01;31
|
||||||
|
.xpm 01;31
|
||||||
|
.XPM 01;31
|
||||||
|
.wmf 01;31
|
||||||
|
.WMF 01;31
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
# Emulator roms, emulator savegames {{{
|
||||||
|
.32x 01;33
|
||||||
|
.32X 01;33
|
||||||
|
.A64 01;33
|
||||||
|
.a64 01;33
|
||||||
|
.a00 01;33
|
||||||
|
.A00 01;33
|
||||||
|
.a52 01;33
|
||||||
|
.A52 01;33
|
||||||
|
.a64 01;33
|
||||||
|
.A64 01;33
|
||||||
|
.a78 01;33
|
||||||
|
.A78 01;33
|
||||||
|
.adf 01;33
|
||||||
|
.ADF 01;33
|
||||||
|
.atr 01;33
|
||||||
|
.ATR 01;33
|
||||||
|
.cdi 01;33
|
||||||
|
.CDI 01;33
|
||||||
|
.fm2 01;33
|
||||||
|
.FM2 01;33
|
||||||
|
.gb 01;33
|
||||||
|
.GB 01;33
|
||||||
|
.gba 01;33
|
||||||
|
.GBA 01;33
|
||||||
|
.gbc 01;33
|
||||||
|
.GBC 01;33
|
||||||
|
.gel 01;33
|
||||||
|
.GEL 01;33
|
||||||
|
.gg 01;33
|
||||||
|
.GG 01;33
|
||||||
|
.ggl 01;33
|
||||||
|
.GGL 01;33
|
||||||
|
.j64 01;33
|
||||||
|
.J64 01;33
|
||||||
|
.nds 01;33
|
||||||
|
.NDS 01;33
|
||||||
|
.nes 01;33
|
||||||
|
.NES 01;33
|
||||||
|
.rom 01;33
|
||||||
|
.ROM 01;33
|
||||||
|
.sav 01;33
|
||||||
|
.SAV 01;33
|
||||||
|
.sms 01;33
|
||||||
|
.SMS 01;33
|
||||||
|
.st 01;33
|
||||||
|
.ST 01;33
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# Disk images: iso, mdf, ... {{{
|
||||||
|
.image 01;33
|
||||||
|
.IMAGE 01;33
|
||||||
|
.img 01;33
|
||||||
|
.IMG 01;33
|
||||||
|
.iso 01;33
|
||||||
|
.ISO 01;33
|
||||||
|
.mdf 01;33
|
||||||
|
.MDF 01;33
|
||||||
|
.nrg 01;33
|
||||||
|
.NRG 01;33
|
||||||
|
.qcow 01;33
|
||||||
|
.QCOW 01;33
|
||||||
|
.vdi 01;33
|
||||||
|
.VDI 01;33
|
||||||
|
.vdmk 01;33
|
||||||
|
.VDMK 01;33
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# Video {{{
|
||||||
|
.3gp 01;35
|
||||||
|
.3GP 01;35
|
||||||
|
.asf 01;35
|
||||||
|
.ASF 01;35
|
||||||
|
.avi 01;35
|
||||||
|
.AVI 01;35
|
||||||
|
.bup 01;35
|
||||||
|
.BUP 01;35
|
||||||
|
.flv 01;35
|
||||||
|
.FLV 01;35
|
||||||
|
.ifo 01;35
|
||||||
|
.IFO 01;35
|
||||||
|
.m2v 01;35
|
||||||
|
.M2V 01;35
|
||||||
|
.mkv 01;35
|
||||||
|
.MKV 01;35
|
||||||
|
.mov 01;35
|
||||||
|
.MOV 01;35
|
||||||
|
.mp4 01;35
|
||||||
|
.MP4 01;35
|
||||||
|
.mpeg 01;35
|
||||||
|
.MPEG 01;35
|
||||||
|
.mpg 01;35
|
||||||
|
.MPG 01;35
|
||||||
|
.ogm 01;35
|
||||||
|
.OGM 01;35
|
||||||
|
.ogv 01;35
|
||||||
|
.OGV 01;35
|
||||||
|
.rmvb 01;35
|
||||||
|
.RMVB 01;35
|
||||||
|
.sample 01;35
|
||||||
|
.SAMPLE 01;35
|
||||||
|
.ts 01;301;35
|
||||||
|
.TS 01;35
|
||||||
|
.vob 01;35
|
||||||
|
.VOB 01;35
|
||||||
|
.webm 01;35
|
||||||
|
.WEBM 01;35
|
||||||
|
.wmv 01;35
|
||||||
|
.WMV 01;35
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# music, audio {{{
|
||||||
|
.aac 33
|
||||||
|
.AAC 33
|
||||||
|
.ape 33
|
||||||
|
.APE 33
|
||||||
|
.cue 33
|
||||||
|
.CUE 33
|
||||||
|
.dat 33
|
||||||
|
.DAT 33
|
||||||
|
.dts 33
|
||||||
|
.DTS 33
|
||||||
|
.fcm 33
|
||||||
|
.FCM 33
|
||||||
|
.flac 33
|
||||||
|
.FLAC 33
|
||||||
|
.m3u 33
|
||||||
|
.M3U 33
|
||||||
|
.m4 33
|
||||||
|
.M4 33
|
||||||
|
.m4a 33
|
||||||
|
.M4A 33
|
||||||
|
.mid 33
|
||||||
|
.MID 33
|
||||||
|
.midi 33
|
||||||
|
.MIDI 33
|
||||||
|
.mod 33
|
||||||
|
.MOD 33
|
||||||
|
.mp3 33
|
||||||
|
.MP3 33
|
||||||
|
.oga 33
|
||||||
|
.OGA 33
|
||||||
|
.ogg 33
|
||||||
|
.OGG 33
|
||||||
|
.plist 33
|
||||||
|
.PLIST 33
|
||||||
|
.pls 33
|
||||||
|
.PLS 33
|
||||||
|
.s3m 33
|
||||||
|
.S3M 33
|
||||||
|
.sid 33
|
||||||
|
.SID 33
|
||||||
|
.spl 33
|
||||||
|
.SPL 33
|
||||||
|
.wav 33
|
||||||
|
.WAV 33
|
||||||
|
.wma 33
|
||||||
|
.WMA 33
|
||||||
|
.wv 33
|
||||||
|
.WV 33
|
||||||
|
.wvc 33
|
||||||
|
.WVC 33
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# fonts {{{
|
||||||
|
.afm 01;34
|
||||||
|
.AFM 01;34
|
||||||
|
.pfb 01;34
|
||||||
|
.PFB 01;34
|
||||||
|
.pfm 01;34
|
||||||
|
.PFM 01;34
|
||||||
|
.ttf 01;34
|
||||||
|
.TTF 01;34
|
||||||
|
.pcf 01;34
|
||||||
|
.PCF 01;34
|
||||||
|
.psf 01;34
|
||||||
|
.PSF 01;34
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# backups, undo files, tempfiles {{{
|
||||||
|
.$$$ 01;30
|
||||||
|
.@@@ 01;30
|
||||||
|
.back 01;30
|
||||||
|
.BACK 01;30
|
||||||
|
.bak 01;30
|
||||||
|
.BAK 01;30
|
||||||
|
.bkp 01;30
|
||||||
|
.BKP 01;30
|
||||||
|
.chk 01;30
|
||||||
|
.CHK 01;30
|
||||||
|
.dbg 01;30
|
||||||
|
.DBG 01;30
|
||||||
|
.gdb 01;30
|
||||||
|
.GDB 01;30
|
||||||
|
.local 01;30
|
||||||
|
.LOCAL 01;30
|
||||||
|
.obj 01;30
|
||||||
|
.OBJ 01;30
|
||||||
|
.old 01;30
|
||||||
|
.OLD 01;30
|
||||||
|
.orig 01;30
|
||||||
|
.ORIG 01;30
|
||||||
|
.original 01;30
|
||||||
|
.ORIGINAL 01;30
|
||||||
|
.pch 01;30
|
||||||
|
.PCH 01;30
|
||||||
|
.pyc 01;30
|
||||||
|
.PYC 01;30
|
||||||
|
.rej 01;30
|
||||||
|
.REJ 01;30
|
||||||
|
.swo 01;30
|
||||||
|
.SWO 01;30
|
||||||
|
.swp 01;30
|
||||||
|
.SWP 01;30
|
||||||
|
.tds 01;30
|
||||||
|
.TDS 01;30
|
||||||
|
.tmp 01;30
|
||||||
|
.TMP 01;30
|
||||||
|
.tmpl 01;30
|
||||||
|
.TMPL 01;30
|
||||||
|
.un~ 01;30
|
||||||
|
.UN~ 01;30
|
||||||
|
.zcompdump 01;30
|
||||||
|
.ZCOMPDUMP 01;30
|
||||||
|
.zwc 01;30
|
||||||
|
.ZWC 01;30
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# databases {{{
|
||||||
|
.cdb 33
|
||||||
|
.CDB 33
|
||||||
|
.db 33
|
||||||
|
.DB 33
|
||||||
|
.dbt 33
|
||||||
|
.DBT 33
|
||||||
|
.dump 33
|
||||||
|
.DUMP 33
|
||||||
|
.mdb 33
|
||||||
|
.MDB 33
|
||||||
|
.pdb 33
|
||||||
|
.PDB 33
|
||||||
|
.sqlite 33
|
||||||
|
.SQLITE 33
|
||||||
|
.typelib 33
|
||||||
|
.TYPELIB 33
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# (compressed) archives {{{
|
||||||
|
.7z 31
|
||||||
|
.7Z 31
|
||||||
|
.a 31
|
||||||
|
.A 31
|
||||||
|
.apk 31
|
||||||
|
.APK 31
|
||||||
|
.arj 31
|
||||||
|
.ARJ 31
|
||||||
|
.bz2 31
|
||||||
|
.BZ2 31
|
||||||
|
.cpio 31
|
||||||
|
.CPIO 31
|
||||||
|
.deb 31
|
||||||
|
.DEB 31
|
||||||
|
.gz 31
|
||||||
|
.GZ 31
|
||||||
|
.ipk 31
|
||||||
|
.IPK 31
|
||||||
|
.jad 31
|
||||||
|
.JAD 31
|
||||||
|
.jar 31
|
||||||
|
.JAR 31
|
||||||
|
.lzma 31
|
||||||
|
.LZMA 31
|
||||||
|
.nth 31
|
||||||
|
.NTH 31
|
||||||
|
.pack 31
|
||||||
|
.PACK 31
|
||||||
|
.part 31
|
||||||
|
.PART 31
|
||||||
|
.rar 31
|
||||||
|
.RAR 31
|
||||||
|
.rpm 31
|
||||||
|
.RPM 31
|
||||||
|
.sfx 31
|
||||||
|
.SFX 31
|
||||||
|
.sis 31
|
||||||
|
.SIS 31
|
||||||
|
.tar 31
|
||||||
|
.TAR 31
|
||||||
|
.tgz 31
|
||||||
|
.TGZ 31
|
||||||
|
.xz 31
|
||||||
|
.XZ 31
|
||||||
|
.zip 31
|
||||||
|
.ZIP 31
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# Office files: pdf, lyx, Gimp, odf, etc ... {{{
|
||||||
|
.cbr 01;34
|
||||||
|
.CBR 01;34
|
||||||
|
.cbz 01;34
|
||||||
|
.CBZ 01;34
|
||||||
|
.chm 01;34
|
||||||
|
.CHM 01;34
|
||||||
|
.dfl 01;34
|
||||||
|
.DFL 01;34
|
||||||
|
.dia 01;34
|
||||||
|
.DIA 01;34
|
||||||
|
.djv 01;34
|
||||||
|
.DJV 01;34
|
||||||
|
.djvu 01;34
|
||||||
|
.DJVU 01;34
|
||||||
|
.doc 01;34
|
||||||
|
.DOC 01;34
|
||||||
|
.docx 01;34
|
||||||
|
.DOCX 01;34
|
||||||
|
.dvi 01;34
|
||||||
|
.DVI 01;34
|
||||||
|
.glade 01;34
|
||||||
|
.GLADE 01;34
|
||||||
|
.hlp 01;34
|
||||||
|
.HLP 01;34
|
||||||
|
.howto 01;34
|
||||||
|
.HOWTO 01;34
|
||||||
|
.lyx 01;34
|
||||||
|
.LYX 01;34
|
||||||
|
.mga 01;34
|
||||||
|
.MGA 01;34
|
||||||
|
.mht 01;34
|
||||||
|
.MHT 01;34
|
||||||
|
.ocp 01;34
|
||||||
|
.OCP 01;34
|
||||||
|
.odf 01;34
|
||||||
|
.ODF 01;34
|
||||||
|
.odt 01;34
|
||||||
|
.ODT 01;34
|
||||||
|
.ods 01;34
|
||||||
|
.ODS 01;34
|
||||||
|
.odp 01;34
|
||||||
|
.ODP 01;34
|
||||||
|
.odb 01;34
|
||||||
|
.ODB 01;34
|
||||||
|
.pdf 01;34
|
||||||
|
.PDF 01;34
|
||||||
|
.ppt 01;34
|
||||||
|
.PPT 01;34
|
||||||
|
.ps 01;34
|
||||||
|
.PS 01;34
|
||||||
|
.rfpdf 01;34
|
||||||
|
.RFPDF 01;34
|
||||||
|
.rtf 01;34
|
||||||
|
.RTF 01;34
|
||||||
|
.xcf 01;34
|
||||||
|
.XCF 01;34
|
||||||
|
.xls 01;34
|
||||||
|
.XLS 01;34
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
# Other file types {{{
|
||||||
|
.ac 01;35 # AutoCAD file
|
||||||
|
.AC 01;35 # AutoCAD file
|
||||||
|
.acm 01;30 # Windows system file
|
||||||
|
.ACM 01;30 # Windows system file
|
||||||
|
.app 01;32
|
||||||
|
.APP 01;32
|
||||||
|
.com 01;32
|
||||||
|
.COM 01;32
|
||||||
|
.exe 01;32
|
||||||
|
.EXE 01;32
|
||||||
|
.jam 01;32 # Java executable
|
||||||
|
.JAM 01;32 # Java executable
|
||||||
|
.jar 01;32 # Java executable
|
||||||
|
.JAR 01;32 # Java executable
|
||||||
|
.lvlib 02;35 # LabVIEW file
|
||||||
|
.LVLIB 02;35 # LabVIEW file
|
||||||
|
.lvproj 02;35 # LabVIEW file
|
||||||
|
.LVPROJ 02;35 # LabVIEW file
|
||||||
|
.msi 01;32
|
||||||
|
.MSI 01;32
|
||||||
|
.pid 31
|
||||||
|
.PID 31
|
||||||
|
.pk 35 # Adobe Audition
|
||||||
|
.PK 35 # Adobe Audition
|
||||||
|
.rtexe 01;32 # LabVIEW RT-executable file
|
||||||
|
.RTEXE 01;32 # LabVIEW RT-executable file
|
||||||
|
.swf 01;35 # Adobe Flesh
|
||||||
|
.SWF 01;35 # Adobe Flesh
|
||||||
|
.torrent 32
|
||||||
|
.TORRENT 32
|
||||||
|
.vi 01;35 # LabVIEW file
|
||||||
|
.VI 01;35 # LabVIEW file
|
||||||
|
.xpi 35
|
||||||
|
.XPI 35
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
# vim: set ft=dircolors fdm=marker et sw=2:
|
|
@ -0,0 +1,764 @@
|
||||||
|
# Terminals {{{
|
||||||
|
TERM Eterm
|
||||||
|
TERM ansi
|
||||||
|
TERM color-xterm
|
||||||
|
TERM con132x25
|
||||||
|
TERM con132x30
|
||||||
|
TERM con132x43
|
||||||
|
TERM con132x60
|
||||||
|
TERM con80x25
|
||||||
|
TERM con80x28
|
||||||
|
TERM con80x30
|
||||||
|
TERM con80x43
|
||||||
|
TERM con80x50
|
||||||
|
TERM con80x60
|
||||||
|
TERM cons25
|
||||||
|
TERM console
|
||||||
|
TERM cygwin
|
||||||
|
TERM dtterm
|
||||||
|
TERM eterm-color
|
||||||
|
TERM gnome
|
||||||
|
TERM gnome-256color
|
||||||
|
TERM jfbterm
|
||||||
|
TERM konsole
|
||||||
|
TERM kterm
|
||||||
|
TERM linux
|
||||||
|
TERM linux-c
|
||||||
|
TERM mach-color
|
||||||
|
TERM mlterm
|
||||||
|
TERM putty
|
||||||
|
TERM rxvt
|
||||||
|
TERM rxvt-256color
|
||||||
|
TERM rxvt-cygwin
|
||||||
|
TERM rxvt-cygwin-native
|
||||||
|
TERM rxvt-unicode
|
||||||
|
TERM rxvt-unicode-256color
|
||||||
|
TERM rxvt-unicode256
|
||||||
|
TERM screen
|
||||||
|
TERM screen-256color
|
||||||
|
TERM screen-256color-bce
|
||||||
|
TERM screen-bce
|
||||||
|
TERM screen-w
|
||||||
|
TERM screen.Eterm
|
||||||
|
TERM screen.rxvt
|
||||||
|
TERM screen.linux
|
||||||
|
TERM st
|
||||||
|
TERM st-256color
|
||||||
|
TERM terminator
|
||||||
|
TERM vt100
|
||||||
|
TERM xterm
|
||||||
|
TERM xterm-16color
|
||||||
|
TERM xterm-256color
|
||||||
|
TERM xterm-88color
|
||||||
|
TERM xterm-color
|
||||||
|
TERM xterm-debian
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
# Help on colors {{{
|
||||||
|
# Attr: 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
|
||||||
|
# Text: 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
|
||||||
|
# 256c: 38;5;0-255
|
||||||
|
# Back: 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
|
||||||
|
# 256c: 48;5;0-255 }}}
|
||||||
|
|
||||||
|
# Special files {{{
|
||||||
|
#NORMAL 00 # no color code at all
|
||||||
|
#FILE 00 # regular file: use no color at all
|
||||||
|
RESET 0 # reset to "normal" color
|
||||||
|
DIR 01;34 # directory
|
||||||
|
# LINK target # symbolic link.
|
||||||
|
LINK 01;36 # symbolic link.
|
||||||
|
MULTIHARDLINK 48;5;188 # regular file with more than one link
|
||||||
|
FIFO 48;5;91 # pipe
|
||||||
|
SOCK 48;5;89 # socket
|
||||||
|
DOOR 01;35 # door
|
||||||
|
BLK 48;5;237;38;5;214 # block device driver
|
||||||
|
CHR 48;5;67;38;5;229 # character device driver
|
||||||
|
ORPHAN 01;05;37;41 # orphaned syminks
|
||||||
|
MISSING 01;05;37;41 # ... and the files they point to
|
||||||
|
SETUID 48;5;1;38;5;46 # file that is setuid (u+s)
|
||||||
|
SETGID 48;5;5;38;5;46 # file that is setgid (g+s)
|
||||||
|
CAPABILITY 30;41 # file with capability
|
||||||
|
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
|
||||||
|
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
|
||||||
|
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
|
||||||
|
EXEC 01;32 # This is for files with execute permission:
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
# Vim-editable: code, text, etc... {{{
|
||||||
|
.alias 38;5;45
|
||||||
|
.ALIAS 38;5;45
|
||||||
|
.allow 38;5;45
|
||||||
|
.ALLOW 38;5;45
|
||||||
|
.am 38;5;45
|
||||||
|
.AM 38;5;45
|
||||||
|
.awk 38;5;45
|
||||||
|
.AWK 38;5;45
|
||||||
|
.ascii 38;5;45
|
||||||
|
.ASCII 38;5;45
|
||||||
|
.asm 38;5;45
|
||||||
|
.ASM 38;5;45
|
||||||
|
.bash 38;5;45
|
||||||
|
.BASH 38;5;45
|
||||||
|
.bashrc 38;5;45
|
||||||
|
.BASHRC 38;5;45
|
||||||
|
.bat 38;5;45
|
||||||
|
.BAT 38;5;45
|
||||||
|
.bff 38;5;45
|
||||||
|
.BFF 38;5;45
|
||||||
|
.c 38;5;45
|
||||||
|
.C 38;5;45
|
||||||
|
.c++ 38;5;45
|
||||||
|
.C++ 38;5;45
|
||||||
|
.cat 38;5;45
|
||||||
|
.CAT 38;5;45
|
||||||
|
.cc 38;5;45
|
||||||
|
.CC 38;5;45
|
||||||
|
.cert 38;5;45
|
||||||
|
.CERT 38;5;45
|
||||||
|
.cfg 38;5;45
|
||||||
|
.CFG 38;5;45
|
||||||
|
.cgi 38;5;45
|
||||||
|
.CGI 38;5;45
|
||||||
|
.cgl 38;5;45
|
||||||
|
.CGL 38;5;45
|
||||||
|
.cl 38;5;45
|
||||||
|
.CL 38;5;45
|
||||||
|
.cmake 38;5;45
|
||||||
|
.CMAKE 38;5;45
|
||||||
|
.cmd 38;5;45
|
||||||
|
.CMD 38;5;45
|
||||||
|
.cnf 38;5;45
|
||||||
|
.CNF 38;5;45
|
||||||
|
.conf 38;5;45
|
||||||
|
.CONF 38;5;45
|
||||||
|
.cpp 38;5;45
|
||||||
|
.CPP 38;5;45
|
||||||
|
.crc 38;5;45
|
||||||
|
.CRC 38;5;45
|
||||||
|
.crt 38;5;45
|
||||||
|
.CRT 38;5;45
|
||||||
|
.csh 38;5;45
|
||||||
|
.CSH 38;5;45
|
||||||
|
.csp 38;5;45
|
||||||
|
.CSP 38;5;45
|
||||||
|
.csr 38;5;45
|
||||||
|
.CSR 38;5;45
|
||||||
|
.css 38;5;45
|
||||||
|
.CSS 38;5;45
|
||||||
|
.csv 38;5;45
|
||||||
|
.CSV 38;5;45
|
||||||
|
.cu 38;5;45
|
||||||
|
.CU 38;5;45
|
||||||
|
.cxx 38;5;45
|
||||||
|
.CXX 38;5;45
|
||||||
|
.def 38;5;45
|
||||||
|
.DEF 38;5;45
|
||||||
|
.defs 38;5;45
|
||||||
|
.DEFS 38;5;45
|
||||||
|
.dep 38;5;45
|
||||||
|
.DEP 38;5;45
|
||||||
|
.desc 38;5;45
|
||||||
|
.DESC 38;5;45
|
||||||
|
.daily 38;5;45
|
||||||
|
.DAILY 38;5;45
|
||||||
|
.deny 38;5;45
|
||||||
|
.DENY 38;5;45
|
||||||
|
.diff 38;5;45
|
||||||
|
.DIFF 38;5;45
|
||||||
|
.diz 38;5;45
|
||||||
|
.DIZ 38;5;45
|
||||||
|
.ebuild 38;5;45
|
||||||
|
.EBUILD 38;5;45
|
||||||
|
.emacs 38;5;45
|
||||||
|
.EMACS 38;5;45
|
||||||
|
.env 38;5;45
|
||||||
|
.ENV 38;5;45
|
||||||
|
.exim 38;5;45
|
||||||
|
.EXIM 38;5;45
|
||||||
|
.fcgi 38;5;45
|
||||||
|
.FCGI 38;5;45
|
||||||
|
.geany 38;5;45
|
||||||
|
.GEANY 38;5;45
|
||||||
|
.h 38;5;45
|
||||||
|
.H 38;5;45
|
||||||
|
.hh 38;5;45
|
||||||
|
.HH 38;5;45
|
||||||
|
.hpp 38;5;45
|
||||||
|
.HPP 38;5;45
|
||||||
|
.htm 38;5;45
|
||||||
|
.HTM 38;5;45
|
||||||
|
.html 38;5;45
|
||||||
|
.HTML 38;5;45
|
||||||
|
.hourly 38;5;45
|
||||||
|
.HOURLY 38;5;45
|
||||||
|
.in 38;5;45
|
||||||
|
.IN 38;5;45
|
||||||
|
.inc 38;5;45
|
||||||
|
.INC 38;5;45
|
||||||
|
.inf 38;5;45
|
||||||
|
.INF 38;5;45
|
||||||
|
.info 38;5;45
|
||||||
|
.INFO 38;5;45
|
||||||
|
.ini 38;5;45
|
||||||
|
.INI 38;5;45
|
||||||
|
.java 38;5;45
|
||||||
|
.JAVA 38;5;45
|
||||||
|
.jhtm 38;5;45
|
||||||
|
.JHTM 38;5;45
|
||||||
|
.js 38;5;45
|
||||||
|
.JS 38;5;45
|
||||||
|
.latex 38;5;45
|
||||||
|
.LATEX 38;5;45
|
||||||
|
.layout 38;5;45
|
||||||
|
.LAYOUT 38;5;45
|
||||||
|
.lex 38;5;45
|
||||||
|
.LEX 38;5;45
|
||||||
|
.lisp 38;5;45
|
||||||
|
.LISP 38;5;45
|
||||||
|
.list 38;5;45
|
||||||
|
.LIST 38;5;45
|
||||||
|
.log 38;5;45
|
||||||
|
.LOG 38;5;45
|
||||||
|
.lst 38;5;45
|
||||||
|
.LST 38;5;45
|
||||||
|
.lua 38;5;45
|
||||||
|
.LUA 38;5;45
|
||||||
|
.make 38;5;45
|
||||||
|
.MAKE 38;5;45
|
||||||
|
.monthly 38;5;45
|
||||||
|
.MONTHLY 38;5;45
|
||||||
|
.out 38;5;45
|
||||||
|
.OUT 38;5;45
|
||||||
|
.pas 38;5;45
|
||||||
|
.PAS 38;5;45
|
||||||
|
.patch 38;5;45
|
||||||
|
.PATCH 38;5;45
|
||||||
|
.pc 38;5;45
|
||||||
|
.PC 38;5;45
|
||||||
|
.pem 38;5;45
|
||||||
|
.PEM 38;5;45
|
||||||
|
.perl 38;5;45
|
||||||
|
.PERL 38;5;45
|
||||||
|
.php 38;5;45
|
||||||
|
.PHP 38;5;45
|
||||||
|
.pl 38;5;45
|
||||||
|
.PL 38;5;45
|
||||||
|
.po 38;5;45
|
||||||
|
.PO 38;5;45
|
||||||
|
.pot 38;5;45
|
||||||
|
.POT 38;5;45
|
||||||
|
.py 38;5;45
|
||||||
|
.PY 38;5;45
|
||||||
|
.rb 38;5;45
|
||||||
|
.RB 38;5;45
|
||||||
|
.rc 38;5;45
|
||||||
|
.RC 38;5;45
|
||||||
|
.reg 38;5;45
|
||||||
|
.REG 38;5;45
|
||||||
|
.rhtml 38;5;45
|
||||||
|
.RHTML 38;5;45
|
||||||
|
.rsp 38;5;45
|
||||||
|
.RSP 38;5;45
|
||||||
|
.ruby 38;5;45
|
||||||
|
.RUBY 38;5;45
|
||||||
|
.sed 38;5;45
|
||||||
|
.SED 38;5;45
|
||||||
|
.sgml 38;5;45
|
||||||
|
.SGML 38;5;45
|
||||||
|
.sh 38;5;45
|
||||||
|
.SH 38;5;45
|
||||||
|
.sql 38;5;45
|
||||||
|
.SQL 38;5;45
|
||||||
|
.src 38;5;45
|
||||||
|
.SRC 38;5;45
|
||||||
|
.sty 38;5;45
|
||||||
|
.STY 38;5;45
|
||||||
|
.style 38;5;45
|
||||||
|
.STYLE 38;5;45
|
||||||
|
.tcc 38;5;45
|
||||||
|
.TCC 38;5;45
|
||||||
|
.tcsh 38;5;45
|
||||||
|
.TCSH 38;5;45
|
||||||
|
.tcl 38;5;45
|
||||||
|
.TCL 38;5;45
|
||||||
|
.tex 38;5;45
|
||||||
|
.TEX 38;5;45
|
||||||
|
.text 38;5;45
|
||||||
|
.TEXT 38;5;45
|
||||||
|
.txt 38;5;45
|
||||||
|
.TXT 38;5;45
|
||||||
|
.vala 38;5;45
|
||||||
|
.VALA 38;5;45
|
||||||
|
.vapi 38;5;45
|
||||||
|
.VAPI 38;5;45
|
||||||
|
.vb 38;5;45
|
||||||
|
.VB 38;5;45
|
||||||
|
.vbi 38;5;45
|
||||||
|
.VBI 38;5;45
|
||||||
|
.vim 38;5;45
|
||||||
|
.VIM 38;5;45
|
||||||
|
.weekly 38;5;45
|
||||||
|
.WEEKLY 38;5;45
|
||||||
|
.wsgi 38;5;45
|
||||||
|
.WSGI 38;5;45
|
||||||
|
.xml 38;5;45
|
||||||
|
.XML 38;5;45
|
||||||
|
.xhtm 38;5;45
|
||||||
|
.XHTM 38;5;45
|
||||||
|
.xhtml 38;5;45
|
||||||
|
.XHTML 38;5;45
|
||||||
|
.yml 38;5;45
|
||||||
|
.YML 38;5;45
|
||||||
|
.yaml 38;5;45
|
||||||
|
.YAML 38;5;45
|
||||||
|
.zh 38;5;45
|
||||||
|
.ZH 38;5;45
|
||||||
|
.zsh 38;5;45
|
||||||
|
.ZSH 38;5;45
|
||||||
|
.zshrc 38;5;45
|
||||||
|
.ZSHRC 38;5;45
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# Pictures and icons {{{
|
||||||
|
.ani 38;5;205
|
||||||
|
.ANI 38;5;205
|
||||||
|
.bmp 38;5;205
|
||||||
|
.BMP 38;5;205
|
||||||
|
.cdr 38;5;205
|
||||||
|
.CDR 38;5;205
|
||||||
|
.cur 38;5;205
|
||||||
|
.CUR 38;5;205
|
||||||
|
.eps 38;5;205
|
||||||
|
.EPS 38;5;205
|
||||||
|
.gif 38;5;205
|
||||||
|
.GIF 38;5;205
|
||||||
|
.ico 38;5;205
|
||||||
|
.ICO 38;5;205
|
||||||
|
.jpg 38;5;205
|
||||||
|
.JPG 38;5;205
|
||||||
|
.jpeg 38;5;205
|
||||||
|
.JPEG 38;5;205
|
||||||
|
.mng 38;5;205
|
||||||
|
.MNG 38;5;205
|
||||||
|
.pcx 38;5;205
|
||||||
|
.PCX 38;5;205
|
||||||
|
.pic 38;5;205
|
||||||
|
.PIC 38;5;205
|
||||||
|
.png 38;5;205
|
||||||
|
.PNG 38;5;205
|
||||||
|
.ppm 38;5;205
|
||||||
|
.PPM 38;5;205
|
||||||
|
.rgb 38;5;205
|
||||||
|
.RGB 38;5;205
|
||||||
|
.svg 38;5;205
|
||||||
|
.SVG 38;5;205
|
||||||
|
.svgz 38;5;205
|
||||||
|
.SVGZ 38;5;205
|
||||||
|
.tif 38;5;205
|
||||||
|
.TIF 38;5;205
|
||||||
|
.tiff 38;5;205
|
||||||
|
.TIFF 38;5;205
|
||||||
|
.xbm 38;5;205
|
||||||
|
.XBM 38;5;205
|
||||||
|
.xpm 38;5;205
|
||||||
|
.XPM 38;5;205
|
||||||
|
.wmf 38;5;205
|
||||||
|
.WMF 38;5;205
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
# Emulator roms, emulator savegames {{{
|
||||||
|
.32x 38;5;136
|
||||||
|
.32X 38;5;136
|
||||||
|
.A64 38;5;136
|
||||||
|
.a64 38;5;136
|
||||||
|
.a00 38;5;136
|
||||||
|
.A00 38;5;136
|
||||||
|
.a52 38;5;136
|
||||||
|
.A52 38;5;136
|
||||||
|
.a64 38;5;136
|
||||||
|
.A64 38;5;136
|
||||||
|
.a78 38;5;136
|
||||||
|
.A78 38;5;136
|
||||||
|
.adf 38;5;136
|
||||||
|
.ADF 38;5;136
|
||||||
|
.atr 38;5;136
|
||||||
|
.ATR 38;5;136
|
||||||
|
.cdi 38;5;136
|
||||||
|
.CDI 38;5;136
|
||||||
|
.fm2 38;5;136
|
||||||
|
.FM2 38;5;136
|
||||||
|
.gb 38;5;136
|
||||||
|
.GB 38;5;136
|
||||||
|
.gba 38;5;136
|
||||||
|
.GBA 38;5;136
|
||||||
|
.gbc 38;5;136
|
||||||
|
.GBC 38;5;136
|
||||||
|
.gel 38;5;136
|
||||||
|
.GEL 38;5;136
|
||||||
|
.gg 38;5;136
|
||||||
|
.GG 38;5;136
|
||||||
|
.ggl 38;5;136
|
||||||
|
.GGL 38;5;136
|
||||||
|
.j64 38;5;136
|
||||||
|
.J64 38;5;136
|
||||||
|
.nds 38;5;136
|
||||||
|
.NDS 38;5;136
|
||||||
|
.nes 38;5;136
|
||||||
|
.NES 38;5;136
|
||||||
|
.rom 38;5;136
|
||||||
|
.ROM 38;5;136
|
||||||
|
.sav 38;5;136
|
||||||
|
.SAV 38;5;136
|
||||||
|
.sms 38;5;136
|
||||||
|
.SMS 38;5;136
|
||||||
|
.st 38;5;136
|
||||||
|
.ST 38;5;136
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# Disk images: iso, mdf, ... {{{
|
||||||
|
.image 38;5;214
|
||||||
|
.IMAGE 38;5;214
|
||||||
|
.img 38;5;214
|
||||||
|
.IMG 38;5;214
|
||||||
|
.iso 38;5;214
|
||||||
|
.ISO 38;5;214
|
||||||
|
.mdf 38;5;214
|
||||||
|
.MDF 38;5;214
|
||||||
|
.nrg 38;5;214
|
||||||
|
.NRG 38;5;214
|
||||||
|
.qcow 38;5;214
|
||||||
|
.QCOW 38;5;214
|
||||||
|
.vdi 38;5;214
|
||||||
|
.VDI 38;5;214
|
||||||
|
.vdmk 38;5;214
|
||||||
|
.VDMK 38;5;214
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# Video {{{
|
||||||
|
.3gp 38;5;165
|
||||||
|
.3GP 38;5;165
|
||||||
|
.asf 38;5;165
|
||||||
|
.ASF 38;5;165
|
||||||
|
.avi 38;5;165
|
||||||
|
.AVI 38;5;165
|
||||||
|
.bup 38;5;165
|
||||||
|
.BUP 38;5;165
|
||||||
|
.flv 38;5;165
|
||||||
|
.FLV 38;5;165
|
||||||
|
.ifo 38;5;165
|
||||||
|
.IFO 38;5;165
|
||||||
|
.m2v 38;5;165
|
||||||
|
.M2V 38;5;165
|
||||||
|
.mkv 38;5;165
|
||||||
|
.MKV 38;5;165
|
||||||
|
.mov 38;5;165
|
||||||
|
.MOV 38;5;165
|
||||||
|
.mp4 38;5;165
|
||||||
|
.MP4 38;5;165
|
||||||
|
.mpeg 38;5;165
|
||||||
|
.MPEG 38;5;165
|
||||||
|
.mpg 38;5;165
|
||||||
|
.MPG 38;5;165
|
||||||
|
.ogm 38;5;165
|
||||||
|
.OGM 38;5;165
|
||||||
|
.ogv 38;5;165
|
||||||
|
.OGV 38;5;165
|
||||||
|
.rmvb 38;5;165
|
||||||
|
.RMVB 38;5;165
|
||||||
|
.sample 38;5;165
|
||||||
|
.SAMPLE 38;5;165
|
||||||
|
.ts 38;5;165
|
||||||
|
.TS 38;5;165
|
||||||
|
.vob 38;5;165
|
||||||
|
.VOB 38;5;165
|
||||||
|
.webm 38;5;165
|
||||||
|
.WEBM 38;5;165
|
||||||
|
.wmv 38;5;165
|
||||||
|
.WMV 38;5;165
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# music, audio {{{
|
||||||
|
.aac 38;5;208
|
||||||
|
.AAC 38;5;208
|
||||||
|
.ape 38;5;208
|
||||||
|
.APE 38;5;208
|
||||||
|
.cue 38;5;208
|
||||||
|
.CUE 38;5;208
|
||||||
|
.dat 38;5;208
|
||||||
|
.DAT 38;5;208
|
||||||
|
.dts 38;5;208
|
||||||
|
.DTS 38;5;208
|
||||||
|
.fcm 38;5;208
|
||||||
|
.FCM 38;5;208
|
||||||
|
.flac 38;5;208
|
||||||
|
.FLAC 38;5;208
|
||||||
|
.m3u 38;5;208
|
||||||
|
.M3U 38;5;208
|
||||||
|
.m4 38;5;208
|
||||||
|
.M4 38;5;208
|
||||||
|
.m4a 38;5;208
|
||||||
|
.M4A 38;5;208
|
||||||
|
.mid 38;5;208
|
||||||
|
.MID 38;5;208
|
||||||
|
.midi 38;5;208
|
||||||
|
.MIDI 38;5;208
|
||||||
|
.mod 38;5;208
|
||||||
|
.MOD 38;5;208
|
||||||
|
.mp3 38;5;208
|
||||||
|
.MP3 38;5;208
|
||||||
|
.oga 38;5;208
|
||||||
|
.OGA 38;5;208
|
||||||
|
.ogg 38;5;208
|
||||||
|
.OGG 38;5;208
|
||||||
|
.plist 38;5;208
|
||||||
|
.PLIST 38;5;208
|
||||||
|
.pls 38;5;208
|
||||||
|
.PLS 38;5;208
|
||||||
|
.s3m 38;5;208
|
||||||
|
.S3M 38;5;208
|
||||||
|
.sid 38;5;208
|
||||||
|
.SID 38;5;208
|
||||||
|
.spl 38;5;208
|
||||||
|
.SPL 38;5;208
|
||||||
|
.wav 38;5;208
|
||||||
|
.WAV 38;5;208
|
||||||
|
.wma 38;5;208
|
||||||
|
.WMA 38;5;208
|
||||||
|
.wv 38;5;208
|
||||||
|
.WV 38;5;208
|
||||||
|
.wvc 38;5;208
|
||||||
|
.WVC 38;5;208
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# fonts {{{
|
||||||
|
.afm 38;5;99
|
||||||
|
.AFM 38;5;99
|
||||||
|
.pfb 38;5;99
|
||||||
|
.PFB 38;5;99
|
||||||
|
.pfm 38;5;99
|
||||||
|
.PFM 38;5;99
|
||||||
|
.ttf 38;5;99
|
||||||
|
.TTF 38;5;99
|
||||||
|
.pcf 38;5;99
|
||||||
|
.PCF 38;5;99
|
||||||
|
.psf 38;5;99
|
||||||
|
.PSF 38;5;99
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# backups, undo files, tempfiles {{{
|
||||||
|
.$$$ 38;5;240
|
||||||
|
.@@@ 38;5;240
|
||||||
|
.back 38;5;240
|
||||||
|
.BACK 38;5;240
|
||||||
|
.bak 38;5;240
|
||||||
|
.BAK 38;5;240
|
||||||
|
.bkp 38;5;240
|
||||||
|
.BKP 38;5;240
|
||||||
|
.chk 38;5;240
|
||||||
|
.CHK 38;5;240
|
||||||
|
.dbg 38;5;240
|
||||||
|
.DBG 38;5;240
|
||||||
|
.gdb 38;5;240
|
||||||
|
.GDB 38;5;240
|
||||||
|
.local 38;5;240
|
||||||
|
.LOCAL 38;5;240
|
||||||
|
.obj 38;5;240
|
||||||
|
.OBJ 38;5;240
|
||||||
|
.old 38;5;240
|
||||||
|
.OLD 38;5;240
|
||||||
|
.orig 38;5;240
|
||||||
|
.ORIG 38;5;240
|
||||||
|
.original 38;5;240
|
||||||
|
.ORIGINAL 38;5;240
|
||||||
|
.pch 38;5;240
|
||||||
|
.PCH 38;5;240
|
||||||
|
.pyc 38;5;240
|
||||||
|
.PYC 38;5;240
|
||||||
|
.rej 38;5;240
|
||||||
|
.REJ 38;5;240
|
||||||
|
.swo 38;5;240
|
||||||
|
.SWO 38;5;240
|
||||||
|
.swp 38;5;240
|
||||||
|
.SWP 38;5;240
|
||||||
|
.tds 38;5;240
|
||||||
|
.TDS 38;5;240
|
||||||
|
.tmp 38;5;240
|
||||||
|
.TMP 38;5;240
|
||||||
|
.tmpl 38;5;240
|
||||||
|
.TMPL 38;5;240
|
||||||
|
.un~ 38;5;240
|
||||||
|
.UN~ 38;5;240
|
||||||
|
.zcompdump 38;5;240
|
||||||
|
.ZCOMPDUMP 38;5;240
|
||||||
|
.zwc 38;5;240
|
||||||
|
.ZWC 38;5;240
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# databases {{{
|
||||||
|
.cdb 38;5;100
|
||||||
|
.CDB 38;5;100
|
||||||
|
.db 38;5;100
|
||||||
|
.DB 38;5;100
|
||||||
|
.dbt 38;5;100
|
||||||
|
.DBT 38;5;100
|
||||||
|
.dump 38;5;100
|
||||||
|
.DUMP 38;5;100
|
||||||
|
.mdb 38;5;100
|
||||||
|
.MDB 38;5;100
|
||||||
|
.pdb 38;5;100
|
||||||
|
.PDB 38;5;100
|
||||||
|
.sqlite 38;5;100
|
||||||
|
.SQLITE 38;5;100
|
||||||
|
.typelib 38;5;100
|
||||||
|
.TYPELIB 38;5;100
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# (compressed) archives {{{
|
||||||
|
.7z 38;5;88
|
||||||
|
.7Z 38;5;88
|
||||||
|
.a 38;5;88
|
||||||
|
.A 38;5;88
|
||||||
|
.apk 38;5;88
|
||||||
|
.APK 38;5;88
|
||||||
|
.arj 38;5;88
|
||||||
|
.ARJ 38;5;88
|
||||||
|
.bz2 38;5;88
|
||||||
|
.BZ2 38;5;88
|
||||||
|
.cpio 38;5;88
|
||||||
|
.CPIO 38;5;88
|
||||||
|
.deb 38;5;88
|
||||||
|
.DEB 38;5;88
|
||||||
|
.gz 38;5;88
|
||||||
|
.GZ 38;5;88
|
||||||
|
.ipk 38;5;88
|
||||||
|
.IPK 38;5;88
|
||||||
|
.jad 38;5;88
|
||||||
|
.JAD 38;5;88
|
||||||
|
.jar 38;5;88
|
||||||
|
.JAR 38;5;88
|
||||||
|
.lzma 38;5;88
|
||||||
|
.LZMA 38;5;88
|
||||||
|
.nth 38;5;88
|
||||||
|
.NTH 38;5;88
|
||||||
|
.pack 38;5;88
|
||||||
|
.PACK 38;5;88
|
||||||
|
.part 38;5;88
|
||||||
|
.PART 38;5;88
|
||||||
|
.rar 38;5;88
|
||||||
|
.RAR 38;5;88
|
||||||
|
.rpm 38;5;88
|
||||||
|
.RPM 38;5;88
|
||||||
|
.sfx 38;5;88
|
||||||
|
.SFX 38;5;88
|
||||||
|
.sis 38;5;88
|
||||||
|
.SIS 38;5;88
|
||||||
|
.tar 38;5;88
|
||||||
|
.TAR 38;5;88
|
||||||
|
.tgz 38;5;88
|
||||||
|
.TGZ 38;5;88
|
||||||
|
.xz 38;5;88
|
||||||
|
.XZ 38;5;88
|
||||||
|
.zip 38;5;88
|
||||||
|
.ZIP 38;5;88
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# Office files: pdf, lyx, Gimp, odf, etc ... {{{
|
||||||
|
.cbr 38;5;75
|
||||||
|
.CBR 38;5;75
|
||||||
|
.cbz 38;5;75
|
||||||
|
.CBZ 38;5;75
|
||||||
|
.chm 38;5;75
|
||||||
|
.CHM 38;5;75
|
||||||
|
.dfl 38;5;75
|
||||||
|
.DFL 38;5;75
|
||||||
|
.dia 38;5;75
|
||||||
|
.DIA 38;5;75
|
||||||
|
.djv 38;5;75
|
||||||
|
.DJV 38;5;75
|
||||||
|
.djvu 38;5;75
|
||||||
|
.DJVU 38;5;75
|
||||||
|
.doc 38;5;75
|
||||||
|
.DOC 38;5;75
|
||||||
|
.docx 38;5;75
|
||||||
|
.DOCX 38;5;75
|
||||||
|
.dvi 38;5;75
|
||||||
|
.DVI 38;5;75
|
||||||
|
.glade 38;5;75
|
||||||
|
.GLADE 38;5;75
|
||||||
|
.hlp 38;5;75
|
||||||
|
.HLP 38;5;75
|
||||||
|
.howto 38;5;75
|
||||||
|
.HOWTO 38;5;75
|
||||||
|
.lyx 38;5;75
|
||||||
|
.LYX 38;5;75
|
||||||
|
.mga 38;5;75
|
||||||
|
.MGA 38;5;75
|
||||||
|
.mht 38;5;75
|
||||||
|
.MHT 38;5;75
|
||||||
|
.ocp 38;5;75
|
||||||
|
.OCP 38;5;75
|
||||||
|
.odf 38;5;75
|
||||||
|
.ODF 38;5;75
|
||||||
|
.odt 38;5;75
|
||||||
|
.ODT 38;5;75
|
||||||
|
.ods 38;5;75
|
||||||
|
.ODS 38;5;75
|
||||||
|
.odp 38;5;75
|
||||||
|
.ODP 38;5;75
|
||||||
|
.odb 38;5;75
|
||||||
|
.ODB 38;5;75
|
||||||
|
.pdf 38;5;75
|
||||||
|
.PDF 38;5;75
|
||||||
|
.ppt 38;5;75
|
||||||
|
.PPT 38;5;75
|
||||||
|
.ps 38;5;75
|
||||||
|
.PS 38;5;75
|
||||||
|
.rfpdf 38;5;75
|
||||||
|
.RFPDF 38;5;75
|
||||||
|
.rtf 38;5;75
|
||||||
|
.RTF 38;5;75
|
||||||
|
.xcf 38;5;75
|
||||||
|
.XCF 38;5;75
|
||||||
|
.xls 38;5;75
|
||||||
|
.XLS 38;5;75
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
# Other file types {{{
|
||||||
|
.ac 38;5;139 # AutoCAD file
|
||||||
|
.AC 38;5;139 # AutoCAD file
|
||||||
|
.acm 38;5;240 # Windows system file
|
||||||
|
.ACM 38;5;240 # Windows system file
|
||||||
|
.app 01;32
|
||||||
|
.APP 01;32
|
||||||
|
.com 01;32
|
||||||
|
.COM 01;32
|
||||||
|
.exe 01;32
|
||||||
|
.EXE 01;32
|
||||||
|
.jam 01;32 # Java executable
|
||||||
|
.JAM 01;32 # Java executable
|
||||||
|
.jar 01;32 # Java executable
|
||||||
|
.JAR 01;32 # Java executable
|
||||||
|
.lvlib 38;5;131 # LabVIEW file
|
||||||
|
.LVLIB 38;5;131 # LabVIEW file
|
||||||
|
.lvproj 38;5;131 # LabVIEW file
|
||||||
|
.LVPROJ 38;5;131 # LabVIEW file
|
||||||
|
.msi 01;32
|
||||||
|
.MSI 01;32
|
||||||
|
.pid 38;5;124
|
||||||
|
.PID 38;5;124
|
||||||
|
.pk 38;5;139 # Adobe Audition
|
||||||
|
.PK 38;5;139 # Adobe Audition
|
||||||
|
.rtexe 01;32 # LabVIEW RT-executable file
|
||||||
|
.RTEXE 01;32 # LabVIEW RT-executable file
|
||||||
|
.swf 38;5;139 # Adobe Flesh
|
||||||
|
.SWF 38;5;139 # Adobe Flesh
|
||||||
|
.torrent 38;5;112
|
||||||
|
.TORRENT 38;5;112
|
||||||
|
.vi 38;5;165 # LabVIEW file
|
||||||
|
.VI 38;5;165 # LabVIEW file
|
||||||
|
.xpi 38;5;167
|
||||||
|
.XPI 38;5;167
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
# vim: set ft=dircolors fdm=marker et sw=2:
|
|
@ -0,0 +1,6 @@
|
||||||
|
! Xft.dpi: 99.0
|
||||||
|
Xft.rgba: none
|
||||||
|
Xft.antialias: true
|
||||||
|
Xft.autohint: false
|
||||||
|
Xft.hinting: true
|
||||||
|
Xft.hintstyle: hintfull
|
46
.gitconfig
46
.gitconfig
|
@ -1,5 +1,5 @@
|
||||||
[user]
|
[user]
|
||||||
email = mecareful@gmail.com
|
email = backbone@backbone.ws
|
||||||
name = Kolan Sh
|
name = Kolan Sh
|
||||||
|
|
||||||
[color]
|
[color]
|
||||||
|
@ -14,30 +14,25 @@
|
||||||
remote = green
|
remote = green
|
||||||
|
|
||||||
[color "diff"]
|
[color "diff"]
|
||||||
meta = yellow bold
|
meta = yellow
|
||||||
frag = magenta bold
|
# frag = magenta bold
|
||||||
old = red bold
|
# old = red bold
|
||||||
new = green bold
|
# new = green bold
|
||||||
|
|
||||||
[color "status"]
|
[color "status"]
|
||||||
added = yellow
|
added = yellow
|
||||||
changed = green
|
changed = green
|
||||||
untracked = cyan
|
untracked = cyan
|
||||||
|
|
||||||
|
[color "decorate"]
|
||||||
|
tag = magenta
|
||||||
|
|
||||||
[alias]
|
[alias]
|
||||||
unstage = reset HEAD --
|
|
||||||
st = status
|
st = status
|
||||||
s = status -uno
|
s = status -uno
|
||||||
ci = commit
|
ci = commit
|
||||||
di = diff -b
|
|
||||||
co = checkout
|
co = checkout
|
||||||
up = checkout
|
glog = log --graph --stat --decorate
|
||||||
update = checkout
|
|
||||||
l = log
|
|
||||||
hgrevert = checkout
|
|
||||||
strip = reset --hard
|
|
||||||
branches = branch -a
|
|
||||||
pull = fetch
|
|
||||||
|
|
||||||
[instaweb]
|
[instaweb]
|
||||||
local = true
|
local = true
|
||||||
|
@ -47,3 +42,26 @@
|
||||||
|
|
||||||
[merge]
|
[merge]
|
||||||
tool = vimdiff
|
tool = vimdiff
|
||||||
|
|
||||||
|
[core]
|
||||||
|
quotepath = false
|
||||||
|
|
||||||
|
[push]
|
||||||
|
default = matching
|
||||||
|
|
||||||
|
[difftool]
|
||||||
|
prompt = false
|
||||||
|
|
||||||
|
[diff]
|
||||||
|
tool = vimdiff
|
||||||
|
|
||||||
|
[mergetool "vimdiff"]
|
||||||
|
keepBackup = false
|
||||||
|
|
||||||
|
#[http]
|
||||||
|
# sslverify = false
|
||||||
|
|
||||||
|
#[branch]
|
||||||
|
# autoSetupMerge = always
|
||||||
|
[pager]
|
||||||
|
branch = false
|
||||||
|
|
|
@ -0,0 +1,243 @@
|
||||||
|
######################################################################
|
||||||
|
# GQview config file version 2.1.5 #
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
# Note: This file is autogenerated. Options can be changed here,
|
||||||
|
# but user comments and formatting will be lost.
|
||||||
|
|
||||||
|
##### General Options #####
|
||||||
|
|
||||||
|
layout_style: 0
|
||||||
|
|
||||||
|
layout_order: "123"
|
||||||
|
|
||||||
|
layout_view_as_icons: true
|
||||||
|
|
||||||
|
layout_view_as_tree: true
|
||||||
|
|
||||||
|
show_icon_names: true
|
||||||
|
|
||||||
|
|
||||||
|
tree_descend_folders: false
|
||||||
|
|
||||||
|
lazy_image_sync: false
|
||||||
|
|
||||||
|
update_on_time_change: true
|
||||||
|
|
||||||
|
exif_auto_rotate: true
|
||||||
|
|
||||||
|
|
||||||
|
enable_startup_path: false
|
||||||
|
|
||||||
|
startup_path:
|
||||||
|
|
||||||
|
zoom_mode: fit
|
||||||
|
two_pass_scaling: true
|
||||||
|
|
||||||
|
zoom_to_fit_allow_expand: true
|
||||||
|
|
||||||
|
|
||||||
|
fit_window_to_image: true
|
||||||
|
|
||||||
|
limit_window_size: false
|
||||||
|
|
||||||
|
max_window_size: 100
|
||||||
|
|
||||||
|
|
||||||
|
progressive_keyboard_scrolling: false
|
||||||
|
|
||||||
|
scroll_reset_method: 0
|
||||||
|
|
||||||
|
|
||||||
|
enable_thumbnails: false
|
||||||
|
|
||||||
|
thumbnail_width: 96
|
||||||
|
|
||||||
|
thumbnail_height: 72
|
||||||
|
|
||||||
|
cache_thumbnails: true
|
||||||
|
|
||||||
|
cache_thumbnails_into_dirs: false
|
||||||
|
|
||||||
|
thumbnail_fast: true
|
||||||
|
|
||||||
|
use_xvpics_thumbnails: true
|
||||||
|
|
||||||
|
thumbnail_spec_standard: true
|
||||||
|
|
||||||
|
|
||||||
|
local_metadata: false
|
||||||
|
|
||||||
|
|
||||||
|
sort_method: 1
|
||||||
|
|
||||||
|
sort_ascending: true
|
||||||
|
|
||||||
|
sort_case_sensitive: false
|
||||||
|
|
||||||
|
|
||||||
|
confirm_delete: true
|
||||||
|
|
||||||
|
enable_delete_key: true
|
||||||
|
|
||||||
|
safe_delete: false
|
||||||
|
|
||||||
|
safe_delete_path: "/home/kolan/.gqview/trash"
|
||||||
|
safe_delete_size: 20
|
||||||
|
|
||||||
|
|
||||||
|
tools_float: false
|
||||||
|
|
||||||
|
tools_hidden: false
|
||||||
|
|
||||||
|
restore_tool_state: false
|
||||||
|
|
||||||
|
toolbar_hidden: false
|
||||||
|
|
||||||
|
mouse_wheel_scrolls: false
|
||||||
|
|
||||||
|
in_place_rename: true
|
||||||
|
|
||||||
|
open_recent_max: 10
|
||||||
|
|
||||||
|
image_cache_size_max: 10
|
||||||
|
|
||||||
|
thumbnail_quality: 1
|
||||||
|
|
||||||
|
zoom_quality: 2
|
||||||
|
|
||||||
|
dither_quality: 1
|
||||||
|
|
||||||
|
zoom_increment: 5
|
||||||
|
|
||||||
|
enable_read_ahead: true
|
||||||
|
|
||||||
|
display_dialogs_under_mouse: false
|
||||||
|
|
||||||
|
black_window_background: false
|
||||||
|
|
||||||
|
fullscreen_screen: -1
|
||||||
|
|
||||||
|
fullscreen_clean_flip: false
|
||||||
|
|
||||||
|
fullscreen_disable_saver: true
|
||||||
|
|
||||||
|
fullscreen_above: false
|
||||||
|
|
||||||
|
custom_similarity_threshold: 99
|
||||||
|
|
||||||
|
|
||||||
|
##### Slideshow Options #####
|
||||||
|
|
||||||
|
slideshow_delay: 15.0
|
||||||
|
|
||||||
|
slideshow_random: false
|
||||||
|
|
||||||
|
slideshow_repeat: false
|
||||||
|
|
||||||
|
|
||||||
|
##### Filtering Options #####
|
||||||
|
|
||||||
|
show_dotfiles: false
|
||||||
|
|
||||||
|
disable_filtering: false
|
||||||
|
|
||||||
|
filter_ext: "icns" ".icns" "Формат изображений ICNS"
|
||||||
|
filter_ext: "gif" ".gif" "Формат изображений GIF"
|
||||||
|
filter_ext: "bmp" ".bmp" "Формат изображений BMP"
|
||||||
|
filter_ext: "pnm" ".pnm;.pbm;.pgm;.ppm" "Семейство форматов изображений PNM/PBM/PGM/PPM"
|
||||||
|
filter_ext: "ico" ".ico;.cur" "Формат изображений ICO"
|
||||||
|
filter_ext: "ani" ".ani" "Формат изображений ANI"
|
||||||
|
filter_ext: "tga" ".tga;.targa" "Формат изображений Targa"
|
||||||
|
filter_ext: "ras" ".ras" "Формат растровых изображений компании Sun"
|
||||||
|
filter_ext: "jpeg" ".jpeg;.jpe;.jpg" "Формат изображений JPEG"
|
||||||
|
filter_ext: "qtif" ".qtif;.qif" "Формат изображений QTIF"
|
||||||
|
filter_ext: "xbm" ".xbm" "Формат изображений XBM"
|
||||||
|
filter_ext: "pcx" ".pcx" "Формат изображений PCX"
|
||||||
|
filter_ext: "xpm" ".xpm" "Формат изображения XPM"
|
||||||
|
filter_ext: "wbmp" ".wbmp" "Формат изображений WBMP"
|
||||||
|
filter_ext: "png" ".png" "Формат изображений PNG"
|
||||||
|
filter_ext: "#tiff" ".tif;.tiff" "Tiff"
|
||||||
|
filter_ext: "#svg" ".svg" "Scalable Vector Graphics"
|
||||||
|
filter_ext: "crw" ".crw;.cr2" "Canon raw format"
|
||||||
|
filter_ext: "raf" ".raf" "Fujifilm raw format"
|
||||||
|
filter_ext: "nef" ".nef" "Nikon raw format"
|
||||||
|
filter_ext: "orf" ".orf" "Olympus raw format"
|
||||||
|
filter_ext: "pef" ".pef" "Pentax raw format"
|
||||||
|
|
||||||
|
##### Color Profiles #####
|
||||||
|
|
||||||
|
# NOTICE: GQview was not built with support for color profiles,
|
||||||
|
# color profile options will have no effect.
|
||||||
|
|
||||||
|
color_profile_enabled: false
|
||||||
|
|
||||||
|
color_profile_use_image: true
|
||||||
|
|
||||||
|
color_profile_input_type: 0
|
||||||
|
|
||||||
|
color_profile_input_file_1:
|
||||||
|
color_profile_input_name_1:
|
||||||
|
color_profile_input_file_2:
|
||||||
|
color_profile_input_name_2:
|
||||||
|
color_profile_input_file_3:
|
||||||
|
color_profile_input_name_3:
|
||||||
|
color_profile_input_file_4:
|
||||||
|
color_profile_input_name_4:
|
||||||
|
|
||||||
|
color_profile_screen_type: 0
|
||||||
|
|
||||||
|
color_profile_screen_file_1:
|
||||||
|
|
||||||
|
##### External Programs #####
|
||||||
|
# Maximum of 10 programs (external_1 through external_10)
|
||||||
|
# format: external_n: "menu name" "command line"
|
||||||
|
|
||||||
|
external_1: "The Gimp" "gimp -n %f"
|
||||||
|
external_2: "XV" "xv %f"
|
||||||
|
external_3: "Xpaint" "xpaint %f"
|
||||||
|
external_4: "Awesome BG" "rm ~/.config/awesome/wallpaper.slink; ln -sf %f ~/.config/awesome/wallpaper.slink && ~/.config/awesome/set_wall.sh ~/.config/awesome/wallpaper.slink"
|
||||||
|
external_5: "Awesome 1 BG" "rm ~/.config/awesome/wallpaper1.slink; ln -sf %f ~/.config/awesome/wallpaper1.slink; killall -s SIGHUP awesome"
|
||||||
|
external_6: "Awesome 2 BG" "rm ~/.config/awesome/wallpaper2.slink; ln -sf %f ~/.config/awesome/wallpaper2.slink; killall -s SIGHUP awesome"
|
||||||
|
external_7: "Awesome 3 BG" "rm ~/.config/awesome/wallpaper3.slink; ln -sf %f ~/.config/awesome/wallpaper3.slink; killall -s SIGHUP awesome"
|
||||||
|
external_8: "" ""
|
||||||
|
external_9: "Повернуть jpeg по часовой стрелк" "%vif jpegtran -rotate 90 -copy all -outfile %p_tmp %p; then mv %p_tmp %p;else rm %p_tmp;fi"
|
||||||
|
external_10: "Повернуть jpeg против часовой ст" "%vif jpegtran -rotate 270 -copy all -outfile %p_tmp %p; then mv %p_tmp %p;else rm %p_tmp;fi"
|
||||||
|
|
||||||
|
##### Collection Options #####
|
||||||
|
|
||||||
|
rectangular_selections: false
|
||||||
|
|
||||||
|
|
||||||
|
##### Window Positions #####
|
||||||
|
|
||||||
|
restore_window_positions: false
|
||||||
|
|
||||||
|
|
||||||
|
main_window_x: 219
|
||||||
|
|
||||||
|
main_window_y: 43
|
||||||
|
|
||||||
|
main_window_width: 700
|
||||||
|
|
||||||
|
main_window_height: 500
|
||||||
|
|
||||||
|
main_window_maximized: false
|
||||||
|
|
||||||
|
float_window_x: 0
|
||||||
|
|
||||||
|
float_window_y: 0
|
||||||
|
|
||||||
|
float_window_width: 260
|
||||||
|
|
||||||
|
float_window_height: 450
|
||||||
|
|
||||||
|
float_window_divider: 200
|
||||||
|
|
||||||
|
divider_position_h: 270
|
||||||
|
|
||||||
|
divider_position_v: 200
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# end of GQview config file #
|
||||||
|
######################################################################
|
10
.gtkrc-2.0
10
.gtkrc-2.0
|
@ -1,16 +1,18 @@
|
||||||
# -- THEME AUTO-WRITTEN DO NOT EDIT
|
# -- THEME AUTO-WRITTEN DO NOT EDIT
|
||||||
include "/usr/share/themes/Equinox/gtk-2.0/gtkrc"
|
include "/usr/share/themes/Adwaita/gtk-2.0/gtkrc"
|
||||||
|
|
||||||
style "user-font" {
|
style "user-font" {
|
||||||
font_name = "Liberation Sans 8"
|
font_name = "Liberation Sans 12"
|
||||||
}
|
}
|
||||||
|
|
||||||
widget_class "*" style "user-font"
|
widget_class "*" style "user-font"
|
||||||
|
|
||||||
gtk-font-name="Liberation Sans 8"
|
gtk-font-name="Liberation Sans 12"
|
||||||
|
|
||||||
gtk-theme-name = "Equinox"
|
gtk-theme-name = "Adwaita"
|
||||||
|
|
||||||
include "/home/kolan/.gtkrc.mine"
|
include "/home/kolan/.gtkrc.mine"
|
||||||
|
|
||||||
|
#gtk-cursor-theme-name = "gentoo-silver"
|
||||||
|
|
||||||
# -- THEME AUTO-WRITTEN DO NOT EDIT
|
# -- THEME AUTO-WRITTEN DO NOT EDIT
|
||||||
|
|
36
.hgrc
36
.hgrc
|
@ -1,7 +1,11 @@
|
||||||
[ui]
|
[ui]
|
||||||
username = Kolan Sh <mecareful@gmail.com>
|
username = Kolan Sh <backbone@backbone.ws>
|
||||||
|
|
||||||
[hostfingerprints]
|
[hostfingerprints]
|
||||||
|
bitbucket.org=3f:d3:c5:17:23:3c:cd:f5:2d:17:76:06:93:7e:ee:97:42:21:14:aa
|
||||||
|
hg.backbone.ws=1d:5d:e2:95:c6:ee:1a:63:9a:9b:09:79:f6:30:a9:2a:50:7d:4e:09
|
||||||
|
hg.insysltd.ru=ec:ff:06:cf:59:88:ae:58:eb:f4:79:30:56:f7:36:c2:dd:52:a9:41
|
||||||
|
hg.insysltd.org=ec:ff:06:cf:59:88:ae:58:eb:f4:79:30:56:f7:36:c2:dd:52:a9:41
|
||||||
|
|
||||||
[ui]
|
[ui]
|
||||||
verbose = true
|
verbose = true
|
||||||
|
@ -19,10 +23,13 @@ cmd.cdiff = colordiff
|
||||||
opts.cdiff = -uprN
|
opts.cdiff = -uprN
|
||||||
|
|
||||||
[extensions]
|
[extensions]
|
||||||
duckcharset = ~/.hgext/duckcharset/hgext/duckcharset.py
|
#duckcharset = ~/.hgext/duckcharset/hgext/duckcharset.py
|
||||||
onsub= ~/.hgext/onsub/onsub.py
|
#onsub= ~/.hgext/onsub/onsub.py
|
||||||
compass = ~/.hgext/compass/compass.py
|
#compass = ~/.hgext/compass/compass.py
|
||||||
hggit = ~/.hgext/hg-git/hggit
|
#hggit = ~/.hgext/hg-git/hggit
|
||||||
|
#hgshelve = ~/.hgext/hgshelve/hgshelve.py
|
||||||
|
#histedit = ~/.hgext/histedit/hg_histedit.py
|
||||||
|
#hgext.hgshelve=
|
||||||
# fixcase = ~/.hgext/fixcase/fixcase.py
|
# fixcase = ~/.hgext/fixcase/fixcase.py
|
||||||
hgext.bookmarks =
|
hgext.bookmarks =
|
||||||
eol =
|
eol =
|
||||||
|
@ -37,7 +44,7 @@ record=
|
||||||
fetch=
|
fetch=
|
||||||
convert=
|
convert=
|
||||||
# brokes .hgignore (for example in /.hg)
|
# brokes .hgignore (for example in /.hg)
|
||||||
#largefiles =
|
largefiles =
|
||||||
pager =
|
pager =
|
||||||
parentrevspec =
|
parentrevspec =
|
||||||
progress =
|
progress =
|
||||||
|
@ -47,6 +54,11 @@ relink =
|
||||||
schemes=
|
schemes=
|
||||||
mq =
|
mq =
|
||||||
churn =
|
churn =
|
||||||
|
#journal =
|
||||||
|
shelve=
|
||||||
|
|
||||||
|
[patch]
|
||||||
|
eol = auto
|
||||||
|
|
||||||
[web]
|
[web]
|
||||||
pygments_style=tango
|
pygments_style=tango
|
||||||
|
@ -64,6 +76,7 @@ cacerts=
|
||||||
|
|
||||||
[largefiles]
|
[largefiles]
|
||||||
minsize = 1
|
minsize = 1
|
||||||
|
usercache = ~/.hg-largefiles
|
||||||
|
|
||||||
[pager]
|
[pager]
|
||||||
pager = LESS='FSRX' less
|
pager = LESS='FSRX' less
|
||||||
|
@ -78,6 +91,13 @@ clear-complete = True
|
||||||
disable = False
|
disable = False
|
||||||
assume-tty = False
|
assume-tty = False
|
||||||
|
|
||||||
|
[alias]
|
||||||
|
s = status -mard -S
|
||||||
|
|
||||||
[subpaths]
|
[subpaths]
|
||||||
http[s]?://(.*)/(.*)/../(.*) = https://\1/\2/\3
|
# step 2
|
||||||
http[s]?://(.*)/(.*)/(.*) = https://\1/\2/../\3
|
([^/@]+)/@@/([^/@]+)$ = \1/@@@/\2
|
||||||
|
# step 1
|
||||||
|
([^/@]+)/([^/@]+)$ = \1/@@/\2
|
||||||
|
# step 2
|
||||||
|
([^/@]+)/@@@/([^/@]+)$ = \2
|
||||||
|
|
23
.htoprc
23
.htoprc
|
@ -1,23 +0,0 @@
|
||||||
# Beware! This file is rewritten every time htop exits.
|
|
||||||
# The parser is also very primitive, and not human-friendly.
|
|
||||||
# (I know, it's in the todo list).
|
|
||||||
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
|
||||||
sort_key=39
|
|
||||||
sort_direction=1
|
|
||||||
hide_threads=0
|
|
||||||
hide_kernel_threads=0
|
|
||||||
hide_userland_threads=0
|
|
||||||
shadow_other_users=1
|
|
||||||
show_thread_names=1
|
|
||||||
highlight_base_name=1
|
|
||||||
highlight_megabytes=1
|
|
||||||
highlight_threads=1
|
|
||||||
tree_view=1
|
|
||||||
header_margin=1
|
|
||||||
detailed_cpu_time=1
|
|
||||||
color_scheme=0
|
|
||||||
delay=15
|
|
||||||
left_meters=AllCPUs Memory Swap CPU
|
|
||||||
left_meter_modes=1 1 1 1
|
|
||||||
right_meters=Tasks LoadAverage Uptime Clock Memory Battery
|
|
||||||
right_meter_modes=2 2 2 2 2 2
|
|
|
@ -1,22 +1,27 @@
|
||||||
# This file is automatically generated by Links -- please do not edit.
|
# This file is automatically generated by Links -- please do not edit.
|
||||||
async_dns 1
|
download_dir ""
|
||||||
download_utime 0
|
language "Russian"
|
||||||
max_connections 10
|
max_connections 10
|
||||||
max_connections_to_host 8
|
max_connections_to_host 8
|
||||||
retries 3
|
retries 3
|
||||||
receive_timeout 120
|
receive_timeout 120
|
||||||
unrestartable_receive_timeout 600
|
unrestartable_receive_timeout 600
|
||||||
|
bind_address ""
|
||||||
|
bind_address_ipv6 ""
|
||||||
|
async_dns 1
|
||||||
|
download_utime 0
|
||||||
format_cache_size 5
|
format_cache_size 5
|
||||||
memory_cache_size 1M
|
memory_cache_size 1M
|
||||||
image_cache_size 1M
|
image_cache_size 1M
|
||||||
font_cache_size 2M
|
font_cache_size 2M
|
||||||
|
http_bugs.aggressive_cache 1
|
||||||
|
ipv6.address_preference 0
|
||||||
http_proxy ""
|
http_proxy ""
|
||||||
ftp_proxy ""
|
ftp_proxy ""
|
||||||
|
https_proxy ""
|
||||||
socks_proxy ""
|
socks_proxy ""
|
||||||
-append_text_to_dns_lookups ""
|
append_text_to_dns_lookups ""
|
||||||
only_proxies 0
|
only_proxies 0
|
||||||
download_dir ""
|
|
||||||
language "Russian"
|
|
||||||
http_bugs.http10 0
|
http_bugs.http10 0
|
||||||
http_bugs.allow_blacklist 1
|
http_bugs.allow_blacklist 1
|
||||||
http_bugs.bug_302_redirect 1
|
http_bugs.bug_302_redirect 1
|
||||||
|
@ -24,13 +29,13 @@ http_bugs.bug_post_no_keepalive 0
|
||||||
http_bugs.no_accept_charset 0
|
http_bugs.no_accept_charset 0
|
||||||
http_bugs.no_compression 0
|
http_bugs.no_compression 0
|
||||||
http_bugs.retry_internal_errors 0
|
http_bugs.retry_internal_errors 0
|
||||||
http_bugs.aggressive_cache 1
|
|
||||||
http_referer 0
|
http_referer 0
|
||||||
fake_referer ""
|
fake_referer ""
|
||||||
fake_useragent ""
|
fake_useragent ""
|
||||||
http.extra_header ""
|
http.extra_header ""
|
||||||
ftp.anonymous_password "somebody@host.domain"
|
ftp.anonymous_password "somebody@host.domain"
|
||||||
ftp.use_passive 0
|
ftp.use_passive 0
|
||||||
|
ftp.use_eprt_epsv 0
|
||||||
ftp.fast 0
|
ftp.fast 0
|
||||||
ftp.set_iptos 1
|
ftp.set_iptos 1
|
||||||
menu_font_size 16
|
menu_font_size 16
|
||||||
|
@ -39,28 +44,22 @@ foreground_color 0
|
||||||
scroll_bar_area_color 12632256
|
scroll_bar_area_color 12632256
|
||||||
scroll_bar_bar_color 0
|
scroll_bar_bar_color 0
|
||||||
scroll_bar_frame_color 0
|
scroll_bar_frame_color 0
|
||||||
|
bookmarks_codepage us-ascii
|
||||||
|
bookmarks_file "/home/kolan/.links/bookmarks.html"
|
||||||
display_red_gamma 2.2000
|
display_red_gamma 2.2000
|
||||||
display_green_gamma 2.2000
|
display_green_gamma 2.2000
|
||||||
display_blue_gamma 2.2000
|
display_blue_gamma 2.2000
|
||||||
user_gamma 1.0000
|
user_gamma 1.0000
|
||||||
bfu_aspect 1.0000
|
bfu_aspect 1.0000
|
||||||
aspect_on 1
|
aspect_on 1
|
||||||
|
display_optimize 0
|
||||||
dither_letters 1
|
dither_letters 1
|
||||||
dither_images 1
|
dither_images 1
|
||||||
display_optimize 0
|
|
||||||
gamma_correction 2
|
gamma_correction 2
|
||||||
enable_javascript 1
|
overwrite_instead_of_scroll 1
|
||||||
verbose_javascript_errors 0
|
|
||||||
verbose_javascript_warnings 0
|
|
||||||
enable_all_conversions 1
|
|
||||||
enable_global_resolution 1
|
|
||||||
javascript_manual_confirmation 1
|
|
||||||
js_recursion_depth 100
|
|
||||||
js_memory_limit 5k
|
|
||||||
bookmarks_codepage us-ascii
|
|
||||||
bookmarks_file "/home/kolan/.links/bookmarks.html"
|
|
||||||
terminal "rxvt-unicode" 0 1 0 koi8-r
|
terminal "rxvt-unicode" 0 1 0 koi8-r
|
||||||
terminal "rxvt" 0 1 0 utf-8
|
terminal "rxvt" 0 1 0 utf-8
|
||||||
|
terminal "screen-256color" 0 1 0 utf-8
|
||||||
extension "aif,aiff,aifc" "audio/x-aiff"
|
extension "aif,aiff,aifc" "audio/x-aiff"
|
||||||
extension "au,snd" "audio/basic"
|
extension "au,snd" "audio/basic"
|
||||||
extension "avi" "video/x-msvideo"
|
extension "avi" "video/x-msvideo"
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
/dev/null
|
|
@ -0,0 +1,19 @@
|
||||||
|
[default]
|
||||||
|
# Write your default config options here!
|
||||||
|
#heartbeat-cmd="(nice -n 20 /usr/bin/xscreensaver-command -deactivate >/dev/null 2>&1)&"
|
||||||
|
#heartbeat-cmd="xset dpms force on"
|
||||||
|
heartbeat-cmd="xscreensaver-command -deactivate"
|
||||||
|
#stop-xscreensaver=no
|
||||||
|
audiofile-cache=5000
|
||||||
|
cache=16000
|
||||||
|
cache-min=30
|
||||||
|
cache-seek-min=30
|
||||||
|
#af=equalizer=5:5:5:0:0:0:-2:-2:-2
|
||||||
|
|
||||||
|
|
||||||
|
[gnome-mplayer]
|
||||||
|
#vo=vdpau
|
||||||
|
ao=alsa
|
||||||
|
alang=Russian,rus,ru
|
||||||
|
slang=Russian,rus,ru
|
||||||
|
msglevel=all=5
|
|
@ -0,0 +1,111 @@
|
||||||
|
set autoindent
|
||||||
|
set boldtext
|
||||||
|
set const
|
||||||
|
set historylog
|
||||||
|
set morespace
|
||||||
|
set smooth
|
||||||
|
set regexp
|
||||||
|
set fill 72
|
||||||
|
set multibuffer
|
||||||
|
set suspend
|
||||||
|
|
||||||
|
syntax "pkgbuild" "^.*PKGBUILD$"
|
||||||
|
color green start="^" end="$"
|
||||||
|
color cyan "^.*(pkgname|pkgver|pkgrel|pkgdesc|force|url|license|install|source|md5sums|groups|backup|depends|makedepends|conflicts|provides|replaces).*=.*$"
|
||||||
|
color brightcyan "\<(pkgname|pkgver|pkgrel|pkgdesc|force|url|license|install|source|md5sums|groups|backup|depends|makedepends|conflicts|provides|replaces)\>"
|
||||||
|
color cyan "\.install"
|
||||||
|
color brightwhite "=" "'" "\(" "\)" "\"" "#.*$" "\," "\{" "\}"
|
||||||
|
color brightcyan "(\$|\$\{|\$\()(pkgname|pkgver|pkgrel|pkgdesc|force|url|license|install|source|md5sums|groups|backup|depends|makedepends|conflicts|provides|replaces|startdir)(|\}|\))"
|
||||||
|
color brightred "build\(\)"
|
||||||
|
color brightred "\<(configure|make)\>"
|
||||||
|
color red "\<(DESTDIR|PREFIX|prefix|sysconfdir|datadir|libdir|includedir|mandir)\>"
|
||||||
|
|
||||||
|
syntax "c-file" "\.(c|h)$"
|
||||||
|
color red "\<[A-Z_]{2,}\>"
|
||||||
|
color green "\<(float|char|int|void|static|const|struct)\>"
|
||||||
|
color brightyellow "\<(if|while|do|else|case|switch)\>"
|
||||||
|
color brightcyan "^#( )*(define|include|ifn?def|endif|elif|else|if)"
|
||||||
|
|
||||||
|
syntax "php" "\.php[2345s~]?$"
|
||||||
|
color brightblue "(.*)\("
|
||||||
|
color blue "\$[a-zA-Z_0-9$]*|[=!<>]"
|
||||||
|
color green "(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|@|while)\s"
|
||||||
|
color green "[.,{}();]"
|
||||||
|
color red "('.*')|(\".*\")"
|
||||||
|
color brightyellow "(#.*|//.*)$"
|
||||||
|
color brightyellow start="/\*" end="\*/"
|
||||||
|
color brightblue "(<\?(php)?|\?>)"
|
||||||
|
color white start="\?>" end="<\?(php)?"
|
||||||
|
|
||||||
|
syntax "HTML" "\.html$"
|
||||||
|
color blue start="<" end=">"
|
||||||
|
color red "&[^; ]*;"
|
||||||
|
|
||||||
|
syntax "patch" "\.(patch|diff)$"
|
||||||
|
color brightgreen "^\+.*"
|
||||||
|
color green "^\+\+\+.*"
|
||||||
|
color brightblue "^ .*"
|
||||||
|
color brightred "^-.*"
|
||||||
|
color red "^---.*"
|
||||||
|
color brightyellow "^@@.*"
|
||||||
|
color magenta "^diff.*"
|
||||||
|
|
||||||
|
syntax "Java source" "\.java$"
|
||||||
|
color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>"
|
||||||
|
color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>"
|
||||||
|
color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>"
|
||||||
|
color red ""[^\"]*""
|
||||||
|
color yellow "\<(true|false|null)\>"
|
||||||
|
color blue "//.*"
|
||||||
|
color blue start="/\*" end="\*/"
|
||||||
|
color brightblue start="/\*\*" end="\*/"
|
||||||
|
color brightgreen,green " +$"
|
||||||
|
|
||||||
|
syntax "ml" ".*\.([jrs]?html?|xml|sgml?)$"
|
||||||
|
color white "^.+$"
|
||||||
|
color green start="<" end=">"
|
||||||
|
color cyan "<[^> ]+"
|
||||||
|
color cyan ">"
|
||||||
|
color yellow start="<!DOCTYPE" end="[/]?>"
|
||||||
|
color yellow start="<!--" end="-->"
|
||||||
|
color red "&[^;]*;"
|
||||||
|
|
||||||
|
## syntax highlighting in xorg.conf
|
||||||
|
##
|
||||||
|
syntax "xorg" "xorg\.conf$"
|
||||||
|
color brightwhite "(Section|EndSection|Sub[sS]ection|EndSub[sS]ection)"
|
||||||
|
# keywords
|
||||||
|
color yellow "[^A-Za-z0-9](Identifier|Screen|InputDevice|Option|RightOf|LeftOf|Driver|RgbPath|FontPath|ModulePath|Load|VendorName|ModelName|BoardName|BusID|Device|Monitor|DefaultDepth|View[pP]ort|Depth|Virtual|Modes|Mode|DefaultColorDepth|Modeline|\+vsync|\+hsync|HorizSync|VertRefresh)[^A-Za-z0-9]"
|
||||||
|
# numbers
|
||||||
|
color magenta "[0-9]"
|
||||||
|
# strings
|
||||||
|
color green ""(\\.|[^\"])*""
|
||||||
|
# comments
|
||||||
|
color white "#.*"
|
||||||
|
|
||||||
|
|
||||||
|
# Generic conf/rc/sh file syntax highlighting
|
||||||
|
#############################################
|
||||||
|
syntax "conf/rc/sh" "conf$|rc$|sh$"
|
||||||
|
color white ".+"
|
||||||
|
color green "^#.*"
|
||||||
|
|
||||||
|
# .nanorc syntax highlighting
|
||||||
|
#############################
|
||||||
|
syntax "nanorc" "[\.]*nanorc$"
|
||||||
|
color white "^ *(set|unset).*$"
|
||||||
|
color cyan "^ *(set|unset) (autoindent|backup|const|cut|fill|keypad|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|quotestr|regexp|smooth|speller|suspend|tabsize|tempfile|historylog|view)"
|
||||||
|
color brightwhite "^ *syntax [^ ]*"
|
||||||
|
color brightblue "^ *set\>" "^ *unset\>" "^ *syntax\>"
|
||||||
|
color white "^ *color\>.*"
|
||||||
|
color yellow "^ *color (bright)?(black|blue|cyan|green|magenta|red|white|yellow)\>"
|
||||||
|
color magenta "^ *color\>"
|
||||||
|
color green "^#.*$"
|
||||||
|
|
||||||
|
# grub.conf/cfg syntax highlighting
|
||||||
|
###############################
|
||||||
|
syntax "grub.conf/cfg" "grub\.conf|cfg"
|
||||||
|
color cyan "(^default.+|^timeout.+)"
|
||||||
|
color red "^title.+"
|
||||||
|
color yellow "(initrd.+|kernel.+|root.+)"
|
||||||
|
color green "^#.*"
|
22
.tmux.conf
22
.tmux.conf
|
@ -1,6 +1,11 @@
|
||||||
# Vim keys
|
# Vim keys
|
||||||
bind s split-window -v
|
|
||||||
bind v split-window -h
|
# dirty hack for old tmux which doesn't support -c option
|
||||||
|
# save current path for >=tmux-1.9a
|
||||||
|
bind c new-window -c "#{pane_current_path}"
|
||||||
|
bind s split-window -v -c "#{pane_current_path}"
|
||||||
|
bind v split-window -h -c "#{pane_current_path}"
|
||||||
|
|
||||||
bind h select-pane -L
|
bind h select-pane -L
|
||||||
bind j select-pane -D
|
bind j select-pane -D
|
||||||
bind k select-pane -U
|
bind k select-pane -U
|
||||||
|
@ -10,21 +15,24 @@ bind > resize-pane -R 10
|
||||||
bind - resize-pane -D 10
|
bind - resize-pane -D 10
|
||||||
bind + resize-pane -U 10
|
bind + resize-pane -U 10
|
||||||
bind : command-prompt
|
bind : command-prompt
|
||||||
|
bind R respawn-window
|
||||||
|
bind y swap-window -t -1\; select-window -t -1
|
||||||
|
bind u swap-window -t +1\; select-window -t +1
|
||||||
|
|
||||||
# vi-style controls for copy mode
|
# vi-style controls for copy mode
|
||||||
setw -g mode-keys vi
|
setw -g mode-keys vi
|
||||||
set -g default-terminal "screen-256color"
|
set -g default-terminal "screen-256color"
|
||||||
|
|
||||||
bind-key R respawn-window
|
|
||||||
|
|
||||||
# create a session with a throw-away window
|
# create a session with a throw-away window
|
||||||
new true
|
# new true
|
||||||
#
|
#
|
||||||
# # for future windows, stay open after the command exits
|
# # for future windows, stay open after the command exits
|
||||||
#set set-remain-on-exit on
|
#set set-remain-on-exit on
|
||||||
#
|
#
|
||||||
# # create the windows we really want
|
# # create the windows we really want
|
||||||
neww -n vim
|
# neww -n vim
|
||||||
splitw -v -p 20 -t 0
|
# splitw -v -p 20 -t 0
|
||||||
#
|
#
|
||||||
# # for future windows, revert r-o-e to global value
|
# # for future windows, revert r-o-e to global value
|
||||||
#set -u set-remain-on-exit
|
#set -u set-remain-on-exit
|
||||||
|
@ -33,3 +41,5 @@ splitw -v -p 20 -t 0
|
||||||
#selectw -t 1
|
#selectw -t 1
|
||||||
#selectp -t 0
|
#selectp -t 0
|
||||||
|
|
||||||
|
set-window-option -g xterm-keys on
|
||||||
|
set-option -g history-limit 32768
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
URxvt.cursorBlink: true
|
||||||
|
URxvt*font:-xos4-terminus-medium-r-normal--14-*-*-*-*-*-*
|
||||||
|
URxvt*scrollstyle: next
|
||||||
|
URxvt.url-launcher: firefox
|
||||||
|
URxvt.matcher.button: 1
|
||||||
|
URxvt.colorUL: blue
|
||||||
|
URxvt*saveLines: 32768
|
||||||
|
URxvt.tabbed.tabbar-fg: 7
|
||||||
|
URxvt.tabbed.tabbar-bg: 8
|
||||||
|
URxvt.tabbed.tab-fg: 0
|
||||||
|
URxvt.tabbed.tab-bg: 15
|
||||||
|
URxvt.geometry: 96x32
|
||||||
|
URxvt*perl-ext: tabbedex,matcher
|
||||||
|
|
||||||
|
URxvt*color0: #444444
|
||||||
|
URxvt*color1: #aa0000
|
||||||
|
URxvt*color2: #00aa00
|
||||||
|
URxvt*color3: #999900
|
||||||
|
URxvt*color4: #0000aa
|
||||||
|
URxvt*color5: #990099
|
||||||
|
URxvt*color6: #009999
|
||||||
|
URxvt*color7: grey
|
||||||
|
|
||||||
|
URxvt*color8: #1E2320
|
||||||
|
URxvt*color9: #cc0000
|
||||||
|
URxvt*color10: #00cc00
|
||||||
|
URxvt*color11: #bbbb00
|
||||||
|
URxvt*color12: #0000cc
|
||||||
|
URxvt*color13: #bb00bb
|
||||||
|
URxvt*color14: #00bbbb
|
||||||
|
URxvt*color15: white
|
||||||
|
|
||||||
|
Xcursor.size: 24
|
|
@ -0,0 +1,697 @@
|
||||||
|
#! perl
|
||||||
|
# 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
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
##
|
||||||
|
## Tabbed plugin for rxvt-unicode
|
||||||
|
## Modified by Michal Nazarewicz (mina86/AT/mina86.com), StephenB
|
||||||
|
## (mail4stb/AT/gmail.com), Steven Merrill
|
||||||
|
## <steven dot merrill at gmail.com>, Mark Pustjens
|
||||||
|
## <pustjens@dds.nl> and more...
|
||||||
|
##
|
||||||
|
## The following has been added:
|
||||||
|
##
|
||||||
|
## 1. Depending on time of last activity, activity character differs.
|
||||||
|
## By default, after 4 seconds an asterisk becomes a plus sing,
|
||||||
|
## after next 4 it becomes a colon, and finally, after another 8
|
||||||
|
## seconds it becomes a dot. This can be configured via
|
||||||
|
## tabbar-timeouts resource. It's format is:
|
||||||
|
##
|
||||||
|
## ( <timeout> ":" <character> ":" )* <timeout> ":" <character> ":"
|
||||||
|
##
|
||||||
|
## where <timeout> is timeout in seconds and <character> is
|
||||||
|
## a single activity character.
|
||||||
|
##
|
||||||
|
## 2. The "[NEW]" button can be disabled (who on Earth uses mouse to
|
||||||
|
## create new tab anyways?) by setting new-button resource to yes.
|
||||||
|
##
|
||||||
|
## 3. If title resource is true, tab's title is displayed after last
|
||||||
|
## button. This is handy if you have terminal with no window
|
||||||
|
## decorations. Colours can be configured via title-fg and
|
||||||
|
## title-bg.
|
||||||
|
##
|
||||||
|
## 4. Incorporated Alexey Semenko <asemenko at gmail.com> patch adding
|
||||||
|
## autohide resource. If it's true tab bar is hidden if there is
|
||||||
|
## no more then one tab opened.
|
||||||
|
##
|
||||||
|
## 5. Tabs are indexed in starting with zero hex. :] If you're such
|
||||||
|
## a geek to use urxvt it shouldn't be a problem for you and it
|
||||||
|
## saves few character when many tabs are opened.
|
||||||
|
##
|
||||||
|
## 6. As a minor modification: Final pipe character is removed (unless
|
||||||
|
## title is displayed). This make tab bar look nicer.
|
||||||
|
##
|
||||||
|
## Added by StephenB:
|
||||||
|
##
|
||||||
|
## 7. Tabs can be named with Shift+Up (Enter to confirm, Escape to
|
||||||
|
## cancel).
|
||||||
|
##
|
||||||
|
## 8. "[NEW]" button disabled by default.
|
||||||
|
##
|
||||||
|
## Added by Steven Merrill <steven dot merrill at gmail.com>
|
||||||
|
##
|
||||||
|
## 9. Ability to start a new tab or cycle through tabs via user
|
||||||
|
## commands: tabbedex:(new|next|prev)_tab .
|
||||||
|
## e.g. (in .Xdefaults) URxvt.keysym.M-t: perl:tabbedex:new_tab
|
||||||
|
## (see the urxvt man file for more info about keysym)
|
||||||
|
##
|
||||||
|
## 10. Fix an issue whereby on_user_command would not properly get sent
|
||||||
|
## to other extension packages if the mouse was not over the urxvt
|
||||||
|
## window.
|
||||||
|
##
|
||||||
|
## Added by Thomas Jost:
|
||||||
|
##
|
||||||
|
## 11. Add several user commands: tabbedex:rename_tab,
|
||||||
|
## tabbedex:move_tab_(left|right).
|
||||||
|
## e.g. (see 9.) URxvt.keysym.C-S-Left: perl:tabbex:move_tab_left
|
||||||
|
##
|
||||||
|
## 12. Ability to disable the default keybindings using the
|
||||||
|
## no-tabbedex-keys resource.
|
||||||
|
##
|
||||||
|
## Added by xanf (Illya Klymov):
|
||||||
|
##
|
||||||
|
## 13. Ability to display non-latin characters in tab title.
|
||||||
|
##
|
||||||
|
## Added by jpkotta:
|
||||||
|
##
|
||||||
|
## 14. Tabs inherit command line options.
|
||||||
|
##
|
||||||
|
## Added by Mark Pustjens <pustjens@dds.nl>
|
||||||
|
##
|
||||||
|
## 15. Resources are now read respecting the -name option.
|
||||||
|
##
|
||||||
|
## 16. Ability to prevent the last tab from closing.
|
||||||
|
## Use the following in your ~/.Xdefaults to enable:
|
||||||
|
## URXvt.tabbed.reopen-on-close: yes
|
||||||
|
##
|
||||||
|
|
||||||
|
use Encode qw(decode);
|
||||||
|
|
||||||
|
sub update_autohide {
|
||||||
|
my ($self, $reconfigure) = @_;
|
||||||
|
my $oldh = $self->{tabheight};
|
||||||
|
if ($self->{autohide} && @{ $self->{tabs} } <= 1 &&
|
||||||
|
! (@{ $self->{tabs} } == 1 && $self->{tabs}[-1]->{name})) {
|
||||||
|
$self->{tabheight} = 0;
|
||||||
|
} else {
|
||||||
|
$self->{tabheight} = $self->{maxtabheight};
|
||||||
|
}
|
||||||
|
if ($reconfigure && $self->{tabheight} != $oldh) {
|
||||||
|
$self->configure;
|
||||||
|
$self->copy_properties;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub tab_activity_mark ($$) {
|
||||||
|
my ($self, $tab) = @_;
|
||||||
|
return ' ' unless defined $tab->{lastActivity};
|
||||||
|
return ' ' if $tab == $self->{cur};
|
||||||
|
if (defined $self->{timeouts}) {
|
||||||
|
my $diff = int urxvt::NOW - $tab->{lastActivity};
|
||||||
|
for my $spec (@{ $self->{timeouts} }) {
|
||||||
|
return $spec->[1] if $diff > $spec->[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'*';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub refresh {
|
||||||
|
my ($self) = @_;
|
||||||
|
|
||||||
|
# autohide makes it zero
|
||||||
|
return unless $self->{tabheight};
|
||||||
|
|
||||||
|
my $ncol = $self->ncol;
|
||||||
|
|
||||||
|
my $text = " " x $ncol;
|
||||||
|
my $rend = [($self->{rs_tabbar}) x $ncol];
|
||||||
|
|
||||||
|
my ($ofs, $idx, @ofs) = (0, 0);
|
||||||
|
|
||||||
|
if ($self->{new_button}) {
|
||||||
|
substr $text, 0, 7, "[NEW] |";
|
||||||
|
@$rend[0 .. 5] = ($self->{rs_tab}) x 6;
|
||||||
|
push @ofs, [0, 6, -1 ];
|
||||||
|
$ofs = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
for my $tab (@{ $self->{tabs} }) {
|
||||||
|
my $name = $tab->{name} ? $tab->{name} : $idx;
|
||||||
|
my $act = $self->tab_activity_mark($tab);
|
||||||
|
my $txt = sprintf "%s%s%s", $act, $name, $act;
|
||||||
|
my $len = length $txt;
|
||||||
|
|
||||||
|
substr $text, $ofs, $len + 1, "$txt|";
|
||||||
|
@$rend[$ofs .. $ofs + $len - 1] = ($self->{rs_tab}) x $len
|
||||||
|
if $tab == $self->{cur};
|
||||||
|
|
||||||
|
push @ofs, [ $ofs, $ofs + $len, $idx ];
|
||||||
|
++$idx;
|
||||||
|
$ofs += $len + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
substr $text, --$ofs, 1, ' '; # remove last '|'
|
||||||
|
|
||||||
|
if ($self->{tab_title} && $ofs + 3 < $ncol) {
|
||||||
|
my $term = $self->{term};
|
||||||
|
my @str = $term->XGetWindowProperty($term->parent, $self->{tab_title});
|
||||||
|
if (@str && $str[2]) {
|
||||||
|
my $str = '| ' . decode("utf8", $str[2]);
|
||||||
|
my $len = length $str;
|
||||||
|
$len = $ncol - $ofs if $ofs + $len > $ncol;
|
||||||
|
substr $text, $ofs, $len, substr $str, 0, $len;
|
||||||
|
@$rend[$ofs + 2 .. $ofs + $len - 1] = ($self->{rs_title}) x ($len - 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$self->{tabofs} = \@ofs;
|
||||||
|
|
||||||
|
$self->ROW_t (0, $text, 0, 0, $ncol);
|
||||||
|
$self->ROW_r (0, $rend, 0, 0, $ncol);
|
||||||
|
|
||||||
|
$self->want_refresh;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub new_tab {
|
||||||
|
my ($self, @argv) = @_;
|
||||||
|
|
||||||
|
my $offset = $self->fheight;
|
||||||
|
|
||||||
|
$self->{tabheight} = $self->{maxtabheight}
|
||||||
|
unless $self->{autohide} && !(defined $self->{tabs} && @{ $self->{tabs} });
|
||||||
|
|
||||||
|
# save a backlink to us, make sure tabbedex is inactive
|
||||||
|
push @urxvt::TERM_INIT, sub {
|
||||||
|
my ($term) = @_;
|
||||||
|
$term->{parent} = $self;
|
||||||
|
|
||||||
|
for (0 .. urxvt::NUM_RESOURCES - 1) {
|
||||||
|
my $value = $self->{resource}[$_];
|
||||||
|
|
||||||
|
$term->resource ("+$_" => $value)
|
||||||
|
if defined $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
$term->resource (perl_ext_2 => $term->resource ("perl_ext_2") . ",-tabbedex");
|
||||||
|
};
|
||||||
|
|
||||||
|
push @urxvt::TERM_EXT, urxvt::ext::tabbedex::tab::;
|
||||||
|
|
||||||
|
my $term = new urxvt::term
|
||||||
|
$self->env, $urxvt::RXVTNAME,
|
||||||
|
-embed => $self->parent,
|
||||||
|
@argv;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub configure {
|
||||||
|
my ($self) = @_;
|
||||||
|
|
||||||
|
my $tab = $self->{cur};
|
||||||
|
|
||||||
|
# this is an extremely dirty way to force a configurenotify, but who cares
|
||||||
|
$tab->XMoveResizeWindow (
|
||||||
|
$tab->parent,
|
||||||
|
0, $self->{tabheight} + 1,
|
||||||
|
$self->width, $self->height - $self->{tabheight}
|
||||||
|
);
|
||||||
|
$tab->XMoveResizeWindow (
|
||||||
|
$tab->parent,
|
||||||
|
0, $self->{tabheight},
|
||||||
|
$self->width, $self->height - $self->{tabheight}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub copy_properties {
|
||||||
|
my ($self) = @_;
|
||||||
|
my $tab = $self->{cur};
|
||||||
|
|
||||||
|
my $wm_normal_hints = $self->XInternAtom ("WM_NORMAL_HINTS");
|
||||||
|
|
||||||
|
my $current = delete $self->{current_properties};
|
||||||
|
|
||||||
|
# pass 1: copy over properties different or nonexisting
|
||||||
|
for my $atom ($tab->XListProperties ($tab->parent)) {
|
||||||
|
my ($type, $format, $items) = $self->XGetWindowProperty ($tab->parent, $atom);
|
||||||
|
|
||||||
|
# fix up size hints
|
||||||
|
if ($atom == $wm_normal_hints) {
|
||||||
|
my (@hints) = unpack "l!*", $items;
|
||||||
|
|
||||||
|
$hints[$_] += $self->{tabheight} for (4, 6, 16);
|
||||||
|
|
||||||
|
$items = pack "l!*", @hints;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $cur = delete $current->{$atom};
|
||||||
|
|
||||||
|
# update if changed, we assume empty items and zero type and format will not happen
|
||||||
|
$self->XChangeProperty ($self->parent, $atom, $type, $format, $items)
|
||||||
|
if $cur->[0] != $type or $cur->[1] != $format or $cur->[2] ne $items;
|
||||||
|
|
||||||
|
$self->{current_properties}{$atom} = [$type, $format, $items];
|
||||||
|
}
|
||||||
|
|
||||||
|
# pass 2, delete all extraneous properties
|
||||||
|
$self->XDeleteProperty ($self->parent, $_) for keys %$current;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub my_resource {
|
||||||
|
my $self = shift;
|
||||||
|
$self->x_resource ("tabbed.$_[0]");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub make_current {
|
||||||
|
my ($self, $tab) = @_;
|
||||||
|
|
||||||
|
if (my $cur = $self->{cur}) {
|
||||||
|
delete $cur->{lastActivity};
|
||||||
|
$cur->XUnmapWindow ($cur->parent) if $cur->mapped;
|
||||||
|
$cur->focus_out;
|
||||||
|
}
|
||||||
|
|
||||||
|
$self->{cur} = $tab;
|
||||||
|
|
||||||
|
$self->configure;
|
||||||
|
$self->copy_properties;
|
||||||
|
|
||||||
|
$tab->focus_out; # just in case, should be a nop
|
||||||
|
$tab->focus_in if $self->focus;
|
||||||
|
|
||||||
|
$tab->XMapWindow ($tab->parent);
|
||||||
|
delete $tab->{lastActivity};
|
||||||
|
$self->refresh;
|
||||||
|
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub on_focus_in {
|
||||||
|
my ($self, $event) = @_;
|
||||||
|
$self->{cur}->focus_in;
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
sub on_focus_out {
|
||||||
|
my ($self, $event) = @_;
|
||||||
|
$self->{cur}->focus_out;
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
sub on_key_press {
|
||||||
|
my ($self, $event) = @_;
|
||||||
|
$self->{cur}->key_press ($event->{state}, $event->{keycode}, $event->{time});
|
||||||
|
1;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub on_key_release {
|
||||||
|
my ($self, $event) = @_;
|
||||||
|
$self->{cur}->key_release ($event->{state}, $event->{keycode}, $event->{time});
|
||||||
|
1;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub on_button_release {
|
||||||
|
my ($self, $event) = @_;
|
||||||
|
|
||||||
|
if ($event->{row} == 0) {
|
||||||
|
my $col = $event->{col};
|
||||||
|
for my $button (@{ $self->{tabofs} }) {
|
||||||
|
last if $col < $button->[0];
|
||||||
|
next unless $col <= $button->[1];
|
||||||
|
if ($button->[2] == -1) {
|
||||||
|
$self->new_tab;
|
||||||
|
} else {
|
||||||
|
$self->make_current($self->{tabs}[$button->[2]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
sub on_init {
|
||||||
|
my ($self) = @_;
|
||||||
|
|
||||||
|
$self->{resource} = [map $self->resource ("+$_"), 0 .. urxvt::NUM_RESOURCES - 1];
|
||||||
|
|
||||||
|
$self->resource (int_bwidth => 0);
|
||||||
|
$self->resource (pty_fd => -1);
|
||||||
|
|
||||||
|
$self->{option} = {};
|
||||||
|
for my $key (keys %urxvt::OPTION) {
|
||||||
|
$self->{option}{$key} = $self->option($urxvt::OPTION{$key});
|
||||||
|
}
|
||||||
|
|
||||||
|
# this is for the tabs terminal; order is important
|
||||||
|
$self->option ($urxvt::OPTION{scrollBar}, 0);
|
||||||
|
|
||||||
|
my $fg = $self->my_resource ("tabbar-fg");
|
||||||
|
my $bg = $self->my_resource ("tabbar-bg");
|
||||||
|
my $tabfg = $self->my_resource ("tab-fg");
|
||||||
|
my $tabbg = $self->my_resource ("tab-bg");
|
||||||
|
my $titfg = $self->my_resource ("title-fg");
|
||||||
|
my $titbg = $self->my_resource ("title-bg");
|
||||||
|
|
||||||
|
defined $fg or $fg = 3;
|
||||||
|
defined $bg or $bg = 0;
|
||||||
|
defined $tabfg or $tabfg = 0;
|
||||||
|
defined $tabbg or $tabbg = 1;
|
||||||
|
defined $titfg or $titfg = 15;
|
||||||
|
defined $titbg or $titbg = 8;
|
||||||
|
|
||||||
|
$self->{rs_tabbar} = urxvt::SET_COLOR (urxvt::DEFAULT_RSTYLE, $fg + 2, $bg + 2);
|
||||||
|
$self->{rs_tab} = urxvt::SET_COLOR (urxvt::DEFAULT_RSTYLE, $tabfg + 2, $tabbg + 2);
|
||||||
|
$self->{rs_title} = urxvt::SET_COLOR (urxvt::DEFAULT_RSTYLE, $titfg + 2, $titbg + 2);
|
||||||
|
|
||||||
|
|
||||||
|
my $timeouts = $self->my_resource ("tabbar-timeouts");
|
||||||
|
$timeouts = '16:.:8:::4:+' unless defined $timeouts;
|
||||||
|
if ($timeouts ne '') {
|
||||||
|
my @timeouts;
|
||||||
|
while ($timeouts =~ /^(\d+):(.)(?::(.*))?$/) {
|
||||||
|
push @timeouts, [ int $1, $2 ];
|
||||||
|
$timeouts = defined $3 ? $3 : '';
|
||||||
|
}
|
||||||
|
if (@timeouts) {
|
||||||
|
$self->{timeouts} = [ sort { $b->[0] <=> $a-> [0] } @timeouts ];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$self->{new_button} =
|
||||||
|
($self->my_resource ('new-button') or 'false') !~ /^(?:false|0|no)/i;
|
||||||
|
$self->{tab_title} =
|
||||||
|
($self->my_resource ('title') or 'true') !~ /^(?:false|0|no)/i;
|
||||||
|
$self->{autohide} =
|
||||||
|
($self->my_resource ('autohide') or 'false') !~ /^(?:false|0|no)/i;
|
||||||
|
$self->{no_default_keys} =
|
||||||
|
($self->my_resource ('no-tabbedex-keys') or 'false') !~ /^(?:false|0|no)/i;
|
||||||
|
$self->{reopen_on_close} =
|
||||||
|
($self->my_resource ('reopen-on-close') or 'false') !~ /^(?:false|0|no)/i;
|
||||||
|
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub on_start {
|
||||||
|
my ($self) = @_;
|
||||||
|
|
||||||
|
$self->{maxtabheight} = $self->int_bwidth + $self->fheight + $self->lineSpace;
|
||||||
|
$self->{tabheight} = $self->{autohide} ? 0 : $self->{maxtabheight};
|
||||||
|
|
||||||
|
$self->{running_user_command} = 0;
|
||||||
|
|
||||||
|
$self->cmd_parse ("\033[?25l");
|
||||||
|
|
||||||
|
my @argv = $self->argv;
|
||||||
|
|
||||||
|
do {
|
||||||
|
shift @argv;
|
||||||
|
} while @argv && $argv[0] ne "-e";
|
||||||
|
|
||||||
|
if ($self->{tab_title}) {
|
||||||
|
$self->{tab_title} = $self->{term}->XInternAtom("_NET_WM_NAME", 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$self->new_tab (@argv);
|
||||||
|
|
||||||
|
if (defined $self->{timeouts}) {
|
||||||
|
my $interval = ($self->{timeouts}[@{ $self->{timeouts} } - 1]->[0]);
|
||||||
|
$interval = int($interval / 4);
|
||||||
|
$self->{timer} = urxvt::timer->new
|
||||||
|
->interval($interval < 1 ? 1 : $interval)
|
||||||
|
->cb ( sub { $self->refresh; } );
|
||||||
|
}
|
||||||
|
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub on_configure_notify {
|
||||||
|
my ($self, $event) = @_;
|
||||||
|
|
||||||
|
$self->configure;
|
||||||
|
$self->refresh;
|
||||||
|
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub on_user_command {
|
||||||
|
my ($self, $event) = @_;
|
||||||
|
|
||||||
|
$self->{cur}->{term}->{parent}->tab_user_command($self->{cur}, $event, 1);
|
||||||
|
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub on_wm_delete_window {
|
||||||
|
my ($self) = @_;
|
||||||
|
$_->destroy for @{ $self->{tabs} };
|
||||||
|
1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub tab_start {
|
||||||
|
my ($self, $tab) = @_;
|
||||||
|
|
||||||
|
$tab->XChangeInput ($tab->parent, urxvt::PropertyChangeMask);
|
||||||
|
|
||||||
|
push @{ $self->{tabs} }, $tab;
|
||||||
|
|
||||||
|
# $tab->{name} ||= scalar @{ $self->{tabs} };
|
||||||
|
$self->make_current ($tab);
|
||||||
|
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub tab_destroy {
|
||||||
|
my ($self, $tab) = @_;
|
||||||
|
|
||||||
|
if ($self->{reopen_on_close} && $#{ $self->{tabs} } == 0) {
|
||||||
|
$self->new_tab;
|
||||||
|
$self->make_current ($self->{tabs}[-1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$self->{tabs} = [ grep $_ != $tab, @{ $self->{tabs} } ];
|
||||||
|
$self->update_autohide ();
|
||||||
|
|
||||||
|
if (@{ $self->{tabs} }) {
|
||||||
|
if ($self->{cur} == $tab) {
|
||||||
|
delete $self->{cur};
|
||||||
|
$self->make_current ($self->{tabs}[-1]);
|
||||||
|
} else {
|
||||||
|
$self->refresh;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
# delay destruction a tiny bit
|
||||||
|
$self->{destroy} = urxvt::iw->new->start->cb (sub { $self->destroy });
|
||||||
|
}
|
||||||
|
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub tab_key_press {
|
||||||
|
my ($self, $tab, $event, $keysym, $str) = @_;
|
||||||
|
|
||||||
|
# setting binding keys
|
||||||
|
#open FILE, ">/tmp/key.txt" or die $!;
|
||||||
|
#printf FILE $keysym;
|
||||||
|
#close FILE;
|
||||||
|
|
||||||
|
if ($tab->{is_inputting_name}) {
|
||||||
|
if ($keysym == 0xff0d || $keysym == 0xff8d) { # enter
|
||||||
|
$tab->{name} = $tab->{new_name};
|
||||||
|
$tab->{is_inputting_name} = 0;
|
||||||
|
$self->update_autohide (1);
|
||||||
|
} elsif ($keysym == 0xff1b) { # escape
|
||||||
|
$tab->{name} = $tab->{old_name};
|
||||||
|
$tab->{is_inputting_name} = 0;
|
||||||
|
$self->update_autohide (1);
|
||||||
|
} elsif ($keysym == 0xff08) { # backspace
|
||||||
|
substr $tab->{new_name}, -1, 1, "";
|
||||||
|
$tab->{name} = "$tab->{new_name}█";
|
||||||
|
} elsif ($str !~ /[\x00-\x1f\x80-\xaf]/) {
|
||||||
|
$tab->{new_name} .= $str;
|
||||||
|
$tab->{name} = "$tab->{new_name}█";
|
||||||
|
}
|
||||||
|
$self->refresh;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return () if ($self->{no_default_keys});
|
||||||
|
|
||||||
|
if ($event->{state} & urxvt::ControlMask) {
|
||||||
|
if ($keysym == 0x004a || $keysym == 0x006a) {
|
||||||
|
if (@{ $self->{tabs} } > 1) {
|
||||||
|
$self->change_tab($tab, -1);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
} elsif ($keysym == 0x004b || $keysym == 0x006b) {
|
||||||
|
if (@{ $self->{tabs} } > 1) {
|
||||||
|
$self->change_tab($tab, 1);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
} elsif ($keysym == 0x003b) {
|
||||||
|
$self->new_tab;
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
} elsif ($keysym == 0xff52) {
|
||||||
|
$self->rename_tab($tab);
|
||||||
|
return 1;
|
||||||
|
} elsif ($keysym == 0x0047 || $keysym == 0x0067) {
|
||||||
|
$self->move_tab($tab, 1);
|
||||||
|
return 1;
|
||||||
|
} elsif ($keysym == 0x0048 || $keysym == 0x0068) {
|
||||||
|
$self->move_tab($tab, -1);
|
||||||
|
return 1;
|
||||||
|
} elsif ($keysym == 0x0044) {
|
||||||
|
$tab->destroy;
|
||||||
|
return 1;
|
||||||
|
} elsif ($keysym == 0x0054 || $keysym == 0x0074) {
|
||||||
|
$tab->{is_inputting_name} = 1;
|
||||||
|
$tab->{old_name} = $tab->{name} ? $tab->{name} : "";
|
||||||
|
$tab->{new_name} = "";
|
||||||
|
$tab->{name} = "█";
|
||||||
|
$self->update_autohide (1);
|
||||||
|
$self->refresh;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub tab_property_notify {
|
||||||
|
my ($self, $tab, $event) = @_;
|
||||||
|
|
||||||
|
$self->copy_properties
|
||||||
|
if $event->{window} == $tab->parent;
|
||||||
|
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub tab_add_lines {
|
||||||
|
my ($self, $tab) = @_;
|
||||||
|
my $mark = $self->tab_activity_mark($tab);
|
||||||
|
$tab->{lastActivity} = int urxvt::NOW;
|
||||||
|
$self->refresh if $mark ne $self->tab_activity_mark($tab);
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub tab_user_command {
|
||||||
|
my ($self, $tab, $cmd, $proxy_events) = @_;
|
||||||
|
|
||||||
|
if ($cmd eq 'tabbedex:new_tab') {
|
||||||
|
$self->new_tab;
|
||||||
|
}
|
||||||
|
elsif ($cmd eq 'tabbedex:next_tab') {
|
||||||
|
$self->change_tab($tab, 1);
|
||||||
|
}
|
||||||
|
elsif ($cmd eq 'tabbedex:prev_tab') {
|
||||||
|
$self->change_tab($tab, -1);
|
||||||
|
}
|
||||||
|
elsif ($cmd eq 'tabbedex:move_tab_left') {
|
||||||
|
$self->move_tab($tab, -1);
|
||||||
|
}
|
||||||
|
elsif ($cmd eq 'tabbedex:move_tab_right') {
|
||||||
|
$self->move_tab($tab, 1);
|
||||||
|
}
|
||||||
|
elsif ($cmd eq 'tabbedex:rename_tab') {
|
||||||
|
$self->rename_tab($tab);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
# Proxy the user command through to the tab's term, while taking care not
|
||||||
|
# to get caught in an infinite loop.
|
||||||
|
if ($proxy_events && $self->{running_user_command} == 0) {
|
||||||
|
$self->{running_user_command} = 1;
|
||||||
|
urxvt::invoke($tab->{term}, 20, $cmd);
|
||||||
|
$self->{running_user_command} = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
sub change_tab {
|
||||||
|
my ($self, $tab, $direction) = @_;
|
||||||
|
|
||||||
|
my $idx = 0;
|
||||||
|
++$idx while $self->{tabs}[$idx] != $tab;
|
||||||
|
$idx += $direction;
|
||||||
|
$self->make_current ($self->{tabs}[$idx % @{ $self->{tabs}}]);
|
||||||
|
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
sub move_tab {
|
||||||
|
my ($self, $tab, $direction) = @_;
|
||||||
|
|
||||||
|
if (@{ $self->{tabs} } > 1) {
|
||||||
|
my $idx1 = 0;
|
||||||
|
++$idx1 while $self->{tabs}[$idx1] != $tab;
|
||||||
|
my $idx2 = ($idx1 + $direction) % @{ $self->{tabs} };
|
||||||
|
|
||||||
|
($self->{tabs}[$idx1], $self->{tabs}[$idx2]) =
|
||||||
|
($self->{tabs}[$idx2], $self->{tabs}[$idx1]);
|
||||||
|
$self->make_current ($self->{tabs}[$idx2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
sub rename_tab {
|
||||||
|
my ($self, $tab) = @_;
|
||||||
|
|
||||||
|
$tab->{is_inputting_name} = 1;
|
||||||
|
$tab->{old_name} = $tab->{name} ? $tab->{name} : "";
|
||||||
|
$tab->{new_name} = "";
|
||||||
|
$tab->{name} = "█";
|
||||||
|
$self->update_autohide (1);
|
||||||
|
$self->refresh;
|
||||||
|
|
||||||
|
();
|
||||||
|
}
|
||||||
|
|
||||||
|
package urxvt::ext::tabbedex::tab;
|
||||||
|
|
||||||
|
# helper extension implementing the subwindows of a tabbed terminal.
|
||||||
|
# simply proxies all interesting calls back to the tabbedex class.
|
||||||
|
|
||||||
|
{
|
||||||
|
for my $hook (qw(start destroy user_command key_press property_notify add_lines)) {
|
||||||
|
eval qq{
|
||||||
|
sub on_$hook {
|
||||||
|
my \$parent = \$_[0]{term}{parent}
|
||||||
|
or return;
|
||||||
|
\$parent->tab_$hook (\@_)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
die if $@;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,200 @@
|
||||||
|
" Vim syntax file
|
||||||
|
" Language: Vala
|
||||||
|
" Maintainers: Emmanuele Bassi <ebassi@gnome.org>
|
||||||
|
" Hans Vercammen <hveso3@gmail.com>
|
||||||
|
" pancake <pancake@nopcode.org>
|
||||||
|
" Sebastian Reichel <sre@ring0.de>
|
||||||
|
" Last Change: 2012-02-19
|
||||||
|
" Filenames: *.vala *.vapi
|
||||||
|
"
|
||||||
|
" REFERENCES:
|
||||||
|
" [1] http://live.gnome.org/Vala
|
||||||
|
"
|
||||||
|
" TODO: Possibly when reaching vala 1.0 release
|
||||||
|
" - validate code attributes
|
||||||
|
" - better error checking for known errors
|
||||||
|
" - full support for valadoc
|
||||||
|
"
|
||||||
|
" add vala in /usr/share/vim/vim73/scripts.vim below ruby
|
||||||
|
" to have shebang support
|
||||||
|
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:vala_cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
" Types
|
||||||
|
syn keyword valaType bool char double float size_t ssize_t string unichar void
|
||||||
|
syn keyword valaType int int8 int16 int32 int64 long short
|
||||||
|
syn keyword valaType uint uint8 uint16 uint32 uint64 ulong ushort
|
||||||
|
" Storage keywords
|
||||||
|
syn keyword valaStorage class delegate enum errordomain interface namespace struct
|
||||||
|
" repeat / condition / label
|
||||||
|
syn keyword valaRepeat break continue do for foreach return while
|
||||||
|
syn keyword valaConditional else if switch assert
|
||||||
|
" User Labels
|
||||||
|
syn keyword valaLabel case default
|
||||||
|
|
||||||
|
" Modifiers
|
||||||
|
syn keyword valaModifier abstract const dynamic ensures extern inline internal override
|
||||||
|
syn keyword valaModifier private protected public requires signal static virtual volatile weak
|
||||||
|
syn keyword valaModifier async owned unowned
|
||||||
|
" Constants
|
||||||
|
syn keyword valaConstant false null true
|
||||||
|
" Exceptions
|
||||||
|
syn keyword valaException try catch finally throw
|
||||||
|
" Unspecified Statements
|
||||||
|
syn keyword valaUnspecifiedStatement as base construct delete get in is lock new out params ref sizeof set this throws typeof using value var yield
|
||||||
|
|
||||||
|
" Comments
|
||||||
|
syn cluster valaCommentGroup contains=valaTodo
|
||||||
|
syn keyword valaTodo contained TODO FIXME XXX NOTE
|
||||||
|
|
||||||
|
" valadoc Comments (ported from javadoc comments in java.vim)
|
||||||
|
" TODO: need to verify valadoc syntax
|
||||||
|
if !exists("vala_ignore_valadoc")
|
||||||
|
syn cluster valaDocCommentGroup contains=valaDocTags,valaDocSeeTag
|
||||||
|
syn region valaDocTags contained start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}"
|
||||||
|
syn match valaDocTags contained "@\(param\|exception\|throws\|since\)\s\+\S\+" contains=valaDocParam
|
||||||
|
syn match valaDocParam contained "\s\S\+"
|
||||||
|
syn match valaDocTags contained "@\(author\|brief\|version\|return\|deprecated\)\>"
|
||||||
|
syn region valaDocSeeTag contained matchgroup=valaDocTags start="@see\s\+" matchgroup=NONE end="\_."re=e-1 contains=valaDocSeeTagParam
|
||||||
|
syn match valaDocSeeTagParam contained @"\_[^"]\+"\|<a\s\+\_.\{-}</a>\|\(\k\|\.\)*\(#\k\+\((\_[^)]\+)\)\=\)\=@ extend
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Comment Strings (ported from c.vim)
|
||||||
|
if exists("vala_comment_strings")
|
||||||
|
syn match valaCommentSkip contained "^\s*\*\($\|\s\+\)"
|
||||||
|
syn region valaCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=valaSpecialChar,valaCommentSkip
|
||||||
|
syn region valaComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=valaSpecialChar
|
||||||
|
syn cluster valaCommentStringGroup contains=valaCommentString,valaCharacter,valaNumber
|
||||||
|
|
||||||
|
syn region valaCommentL start="//" end="$" keepend contains=@valaCommentGroup,valaComment2String,valaCharacter,valaNumber,valaSpaceError,@Spell
|
||||||
|
syn region valaComment matchgroup=valaCommentStart start="/\*" end="\*/" contains=@valaCommentGroup,@valaCommentStringGroup,valaCommentStartError,valaSpaceError,@Spell extend fold
|
||||||
|
if !exists("vala_ignore_valadoc")
|
||||||
|
syn region valaDocComment matchgroup=valaCommentStart start="/\*\*" end="\*/" keepend contains=@valaCommentGroup,@valaDocCommentGroup,@valaCommentStringGroup,valaCommentStartError,valaSpaceError,@Spell
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
syn region valaCommentL start="//" end="$" keepend contains=@valaCommentGroup,valaSpaceError,@Spell
|
||||||
|
syn region valaComment matchgroup=valaCommentStart start="/\*" end="\*/" contains=@valaCommentGroup,valaCommentStartError,valaSpaceError,@Spell
|
||||||
|
if !exists("vala_ignore_valadoc")
|
||||||
|
syn region valaDocComment matchgroup=valaCommentStart start="/\*\*" end="\*/" keepend contains=@valaCommentGroup,@valaDocCommentGroup,valaCommentStartError,valaSpaceError,@Spell
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
syn region valaPreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1
|
||||||
|
syn match valaPreCondit display "^\s*\(%:\|#\)\s*\(else\|endif\)\>"
|
||||||
|
|
||||||
|
" Comment if 0 blocks (ported from c.vim)
|
||||||
|
if !exists("vala_no_if0")
|
||||||
|
syn region valaCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=valaCppOut2 fold
|
||||||
|
syn region valaCppOut2 contained start="0" end="^\s*\(%:\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=valaSpaceError,valaCppSkip
|
||||||
|
syn region valaCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=valaSpaceError,valaCppSkip
|
||||||
|
endif
|
||||||
|
|
||||||
|
" match comment errors
|
||||||
|
syntax match valaCommentError display "\*/"
|
||||||
|
syntax match valaCommentStartError display "/\*"me=e-1 contained
|
||||||
|
" match the special comment /**/
|
||||||
|
syn match valaComment "/\*\*/"
|
||||||
|
|
||||||
|
" Vala Code Attributes
|
||||||
|
syn region valaAttribute start="^\s*\[" end="\]$" contains=valaComment,valaString keepend
|
||||||
|
syn region valaAttribute start="\[CCode" end="\]" contains=valaComment,valaString
|
||||||
|
|
||||||
|
" Avoid escaped keyword matching
|
||||||
|
syn match valaUserContent display "@\I*"
|
||||||
|
|
||||||
|
" Strings and constants
|
||||||
|
syn match valaSpecialError contained "\\."
|
||||||
|
syn match valaSpecialCharError contained "[^']"
|
||||||
|
syn match valaSpecialChar contained +\\["\\'0abfnrtvx]+
|
||||||
|
syn region valaString start=+"+ end=+"+ end=+$+ contains=valaSpecialChar,valaSpecialError,valaUnicodeNumber,@Spell
|
||||||
|
syn region valaVerbatimString start=+"""+ end=+"""+ contains=@Spell
|
||||||
|
syn match valaUnicodeNumber +\\\(u\x\{4}\|U\x\{8}\)+ contained contains=valaUnicodeSpecifier
|
||||||
|
syn match valaUnicodeSpecifier +\\[uU]+ contained
|
||||||
|
syn match valaCharacter "'[^']*'" contains=valaSpecialChar,valaSpecialCharError
|
||||||
|
syn match valaCharacter "'\\''" contains=valaSpecialChar
|
||||||
|
syn match valaCharacter "'[^\\]'"
|
||||||
|
syn match valaNumber display "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>"
|
||||||
|
syn match valaNumber display "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\="
|
||||||
|
syn match valaNumber display "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>"
|
||||||
|
syn match valaNumber display "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"
|
||||||
|
|
||||||
|
" when wanted, highlight trailing white space
|
||||||
|
if exists("vala_space_errors")
|
||||||
|
if !exists("vala_no_trail_space_error")
|
||||||
|
syn match valaSpaceError display excludenl "\s\+$"
|
||||||
|
endif
|
||||||
|
if !exists("vala_no_tab_space_error")
|
||||||
|
syn match valaSpaceError display " \+\t"me=e-1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
" when wanted, set minimum lines for comment syntax syncing
|
||||||
|
if exists("vala_minlines")
|
||||||
|
let b:vala_minlines = vala_minlines
|
||||||
|
else
|
||||||
|
let b:vala_minlines = 50
|
||||||
|
endif
|
||||||
|
exec "syn sync ccomment valaComment minlines=" . b:vala_minlines
|
||||||
|
|
||||||
|
" code folding
|
||||||
|
syn region valaBlock start="{" end="}" transparent fold
|
||||||
|
|
||||||
|
" The default highlighting.
|
||||||
|
hi def link valaType Type
|
||||||
|
hi def link valaStorage StorageClass
|
||||||
|
hi def link valaRepeat Repeat
|
||||||
|
hi def link valaConditional Conditional
|
||||||
|
hi def link valaLabel Label
|
||||||
|
hi def link valaModifier StorageClass
|
||||||
|
hi def link valaConstant Constant
|
||||||
|
hi def link valaException Exception
|
||||||
|
hi def link valaUnspecifiedStatement Statement
|
||||||
|
hi def link valaUnspecifiedKeyword Keyword
|
||||||
|
hi def link valaContextualStatement Statement
|
||||||
|
|
||||||
|
hi def link valaCommentError Error
|
||||||
|
hi def link valaCommentStartError Error
|
||||||
|
hi def link valaSpecialError Error
|
||||||
|
hi def link valaSpecialCharError Error
|
||||||
|
hi def link valaSpaceError Error
|
||||||
|
|
||||||
|
hi def link valaTodo Todo
|
||||||
|
hi def link valaCommentL valaComment
|
||||||
|
hi def link valaCommentStart valaComment
|
||||||
|
hi def link valaCommentSkip valaComment
|
||||||
|
hi def link valaComment Comment
|
||||||
|
hi def link valaDocComment Comment
|
||||||
|
hi def link valaDocTags Special
|
||||||
|
hi def link valaDocParam Function
|
||||||
|
hi def link valaDocSeeTagParam Function
|
||||||
|
hi def link valaAttribute PreCondit
|
||||||
|
|
||||||
|
hi def link valaCommentString valaString
|
||||||
|
hi def link valaComment2String valaString
|
||||||
|
hi def link valaString String
|
||||||
|
hi def link valaVerbatimString String
|
||||||
|
hi def link valaCharacter Character
|
||||||
|
hi def link valaSpecialChar SpecialChar
|
||||||
|
hi def link valaNumber Number
|
||||||
|
hi def link valaUnicodeNumber SpecialChar
|
||||||
|
hi def link valaUnicodeSpecifier SpecialChar
|
||||||
|
|
||||||
|
hi def link valaPreCondit PreCondit
|
||||||
|
|
||||||
|
if !exists("vala_no_if0")
|
||||||
|
hi def link valaCppSkip valaCppOut
|
||||||
|
hi def link valaCppOut2 valaCppOut
|
||||||
|
hi def link valaCppOut Comment
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:current_syntax = "vala"
|
||||||
|
|
||||||
|
let &cpo = s:vala_cpo_save
|
||||||
|
unlet s:vala_cpo_save
|
||||||
|
|
||||||
|
" vim: ts=8
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,163 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#bookmarkdir#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#bookmarkdir#getSwitchOrder()
|
||||||
|
return g:fuf_bookmarkdir_switchOrder
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#bookmarkdir#getEditableDataNames()
|
||||||
|
return ['items']
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#bookmarkdir#renewCache()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#bookmarkdir#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#bookmarkdir#onInit()
|
||||||
|
call fuf#defineLaunchCommand('FufBookmarkDir', s:MODE_NAME, '""', [])
|
||||||
|
command! -bang -narg=? FufBookmarkDirAdd call s:bookmark(<q-args>)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
let s:OPEN_TYPE_DELETE = -1
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:bookmark(word)
|
||||||
|
let item = {
|
||||||
|
\ 'time' : localtime(),
|
||||||
|
\ }
|
||||||
|
|
||||||
|
let item.path = l9#inputHl('Question', '[fuf] Directory to bookmark:',
|
||||||
|
\ fnamemodify(getcwd(), ':p:~'), 'dir')
|
||||||
|
if item.path !~ '\S'
|
||||||
|
call fuf#echoWarning('Canceled')
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
let item.word = l9#inputHl('Question', '[fuf] Bookmark as:',
|
||||||
|
\ fnamemodify(getcwd(), ':p:~'))
|
||||||
|
if item.word !~ '\S'
|
||||||
|
call fuf#echoWarning('Canceled')
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
let items = fuf#loadDataFile(s:MODE_NAME, 'items')
|
||||||
|
call insert(items, item)
|
||||||
|
call fuf#saveDataFile(s:MODE_NAME, 'items', items)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:findItem(items, word)
|
||||||
|
for item in a:items
|
||||||
|
if item.word ==# a:word
|
||||||
|
return item
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
return {}
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(g:fuf_bookmarkdir_prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return self.items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
if a:mode ==# s:OPEN_TYPE_DELETE
|
||||||
|
let items = fuf#loadDataFile(s:MODE_NAME, 'items')
|
||||||
|
call filter(items, 'v:val.word !=# a:word')
|
||||||
|
call fuf#saveDataFile(s:MODE_NAME, 'items', items)
|
||||||
|
let self.reservedMode = self.getModeName()
|
||||||
|
return
|
||||||
|
else
|
||||||
|
let item = s:findItem(fuf#loadDataFile(s:MODE_NAME, 'items'), a:word)
|
||||||
|
if !empty(item)
|
||||||
|
execute ':cd ' . fnameescape(item.path)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
call fuf#defineKeyMappingInHandler(g:fuf_bookmarkdir_keyDelete,
|
||||||
|
\ 'onCr(' . s:OPEN_TYPE_DELETE . ')')
|
||||||
|
let self.items = fuf#loadDataFile(s:MODE_NAME, 'items')
|
||||||
|
call map(self.items, 'fuf#makeNonPathItem(v:val.word, strftime(g:fuf_timeFormat, v:val.time))')
|
||||||
|
call fuf#mapToSetSerialIndex(self.items, 1)
|
||||||
|
call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,199 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#bookmarkfile#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#bookmarkfile#getSwitchOrder()
|
||||||
|
return g:fuf_bookmarkfile_switchOrder
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#bookmarkfile#getEditableDataNames()
|
||||||
|
return ['items']
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#bookmarkfile#renewCache()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#bookmarkfile#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#bookmarkfile#onInit()
|
||||||
|
call fuf#defineLaunchCommand('FufBookmarkFile', s:MODE_NAME, '""', [])
|
||||||
|
command! -bang -narg=? FufBookmarkFileAdd call s:bookmarkHere(<q-args>)
|
||||||
|
command! -bang -narg=0 -range FufBookmarkFileAddAsSelectedText call s:bookmarkHere(l9#getSelectedText())
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
let s:OPEN_TYPE_DELETE = -1
|
||||||
|
|
||||||
|
" opens a:path and jumps to the line matching to a:pattern from a:lnum within
|
||||||
|
" a:range. if not found, jumps to a:lnum.
|
||||||
|
function s:jumpToBookmark(path, mode, pattern, lnum)
|
||||||
|
call fuf#openFile(a:path, a:mode, g:fuf_reuseWindow)
|
||||||
|
call cursor(s:getMatchingLineNumber(getline(1, '$'), a:pattern, a:lnum), 0)
|
||||||
|
normal! zvzz
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:getMatchingLineNumber(lines, pattern, lnumBegin)
|
||||||
|
let l = min([a:lnumBegin, len(a:lines)])
|
||||||
|
for [l0, l1] in map(range(0, g:fuf_bookmarkfile_searchRange),
|
||||||
|
\ '[l + v:val, l - v:val]')
|
||||||
|
if l0 <= len(a:lines) && a:lines[l0 - 1] =~# a:pattern
|
||||||
|
return l0
|
||||||
|
elseif l1 >= 0 && a:lines[l1 - 1] =~# a:pattern
|
||||||
|
return l1
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
return l
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:getLinePattern(lnum)
|
||||||
|
return '\C\V\^' . escape(getline(a:lnum), '\') . '\$'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:bookmarkHere(word)
|
||||||
|
if !empty(&buftype) || expand('%') !~ '\S'
|
||||||
|
call fuf#echoWarning('Can''t bookmark this buffer.')
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
let item = {
|
||||||
|
\ 'word' : (a:word =~# '\S' ? substitute(a:word, '\n', ' ', 'g')
|
||||||
|
\ : pathshorten(expand('%:p:~')) . '|' . line('.') . '| ' . getline('.')),
|
||||||
|
\ 'path' : expand('%:p'),
|
||||||
|
\ 'lnum' : line('.'),
|
||||||
|
\ 'pattern' : s:getLinePattern(line('.')),
|
||||||
|
\ 'time' : localtime(),
|
||||||
|
\ }
|
||||||
|
let item.word = l9#inputHl('Question', '[fuf] Bookmark as:', item.word)
|
||||||
|
if item.word !~ '\S'
|
||||||
|
call fuf#echoWarning('Canceled')
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
let items = fuf#loadDataFile(s:MODE_NAME, 'items')
|
||||||
|
call insert(items, item)
|
||||||
|
call fuf#saveDataFile(s:MODE_NAME, 'items', items)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:findItem(items, word)
|
||||||
|
for item in a:items
|
||||||
|
if item.word ==# a:word
|
||||||
|
return item
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
return {}
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(g:fuf_bookmarkfile_prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
let item = s:findItem(fuf#loadDataFile(s:MODE_NAME, 'items'), a:word)
|
||||||
|
let lines = fuf#getFileLines(item.path)
|
||||||
|
if empty(lines)
|
||||||
|
return []
|
||||||
|
endif
|
||||||
|
let index = s:getMatchingLineNumber(lines, item.pattern, item.lnum) - 1
|
||||||
|
return fuf#makePreviewLinesAround(
|
||||||
|
\ lines, [index], a:count, self.getPreviewHeight())
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return self.items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
if a:mode ==# s:OPEN_TYPE_DELETE
|
||||||
|
let items = fuf#loadDataFile(s:MODE_NAME, 'items')
|
||||||
|
call filter(items, 'v:val.word !=# a:word')
|
||||||
|
call fuf#saveDataFile(s:MODE_NAME, 'items', items)
|
||||||
|
let self.reservedMode = self.getModeName()
|
||||||
|
return
|
||||||
|
else
|
||||||
|
let item = s:findItem(fuf#loadDataFile(s:MODE_NAME, 'items'), a:word)
|
||||||
|
if !empty(item)
|
||||||
|
call s:jumpToBookmark(item.path, a:mode, item.pattern, item.lnum)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
call fuf#defineKeyMappingInHandler(g:fuf_bookmarkfile_keyDelete,
|
||||||
|
\ 'onCr(' . s:OPEN_TYPE_DELETE . ')')
|
||||||
|
let self.items = fuf#loadDataFile(s:MODE_NAME, 'items')
|
||||||
|
call map(self.items, 'fuf#makeNonPathItem(v:val.word, strftime(g:fuf_timeFormat, v:val.time))')
|
||||||
|
call fuf#mapToSetSerialIndex(self.items, 1)
|
||||||
|
call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,189 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#buffer#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#buffer#getSwitchOrder()
|
||||||
|
return g:fuf_buffer_switchOrder
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#buffer#getEditableDataNames()
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#buffer#renewCache()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#buffer#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#buffer#onInit()
|
||||||
|
call fuf#defineLaunchCommand('FufBuffer', s:MODE_NAME, '""', [])
|
||||||
|
augroup fuf#buffer
|
||||||
|
autocmd!
|
||||||
|
autocmd BufEnter * call s:updateBufTimes()
|
||||||
|
autocmd BufWritePost * call s:updateBufTimes()
|
||||||
|
augroup END
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
let s:OPEN_TYPE_DELETE = -1
|
||||||
|
|
||||||
|
let s:bufTimes = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:updateBufTimes()
|
||||||
|
let s:bufTimes[bufnr('%')] = localtime()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:makeItem(nr)
|
||||||
|
let fname = (empty(bufname(a:nr))
|
||||||
|
\ ? '[No Name]'
|
||||||
|
\ : fnamemodify(bufname(a:nr), ':p:~:.'))
|
||||||
|
let time = (exists('s:bufTimes[a:nr]') ? s:bufTimes[a:nr] : 0)
|
||||||
|
let item = fuf#makePathItem(fname, strftime(g:fuf_timeFormat, time), 0)
|
||||||
|
let item.index = a:nr
|
||||||
|
let item.bufNr = a:nr
|
||||||
|
let item.time = time
|
||||||
|
let item.abbrPrefix = s:getBufIndicator(a:nr) . ' '
|
||||||
|
return item
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:getBufIndicator(bufNr)
|
||||||
|
if !getbufvar(a:bufNr, '&modifiable')
|
||||||
|
return '[-]'
|
||||||
|
elseif getbufvar(a:bufNr, '&modified')
|
||||||
|
return '[+]'
|
||||||
|
elseif getbufvar(a:bufNr, '&readonly')
|
||||||
|
return '[R]'
|
||||||
|
else
|
||||||
|
return ' '
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:compareTimeDescending(i1, i2)
|
||||||
|
return a:i1.time == a:i2.time ? 0 : a:i1.time > a:i2.time ? -1 : +1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:findItem(items, word)
|
||||||
|
for item in a:items
|
||||||
|
if item.word ==# a:word
|
||||||
|
return item
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
return {}
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(g:fuf_buffer_prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
let item = s:findItem(self.items, a:word)
|
||||||
|
if empty(item)
|
||||||
|
return []
|
||||||
|
endif
|
||||||
|
return fuf#makePreviewLinesForFile(item.bufNr, a:count, self.getPreviewHeight())
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return self.items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
" not use bufnr(a:word) in order to handle unnamed buffer
|
||||||
|
let item = s:findItem(self.items, a:word)
|
||||||
|
if empty(item)
|
||||||
|
" do nothing
|
||||||
|
elseif a:mode ==# s:OPEN_TYPE_DELETE
|
||||||
|
execute item.bufNr . 'bdelete'
|
||||||
|
let self.reservedMode = self.getModeName()
|
||||||
|
else
|
||||||
|
call fuf#openBuffer(item.bufNr, a:mode, g:fuf_reuseWindow)
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
call fuf#defineKeyMappingInHandler(g:fuf_buffer_keyDelete,
|
||||||
|
\ 'onCr(' . s:OPEN_TYPE_DELETE . ')')
|
||||||
|
let self.items = range(1, bufnr('$'))
|
||||||
|
call filter(self.items, 'buflisted(v:val) && v:val != self.bufNrPrev && v:val != bufnr("%")')
|
||||||
|
call map(self.items, 's:makeItem(v:val)')
|
||||||
|
if g:fuf_buffer_mruOrder
|
||||||
|
call sort(self.items, 's:compareTimeDescending')
|
||||||
|
call fuf#mapToSetSerialIndex(self.items, 1)
|
||||||
|
endif
|
||||||
|
let self.items = fuf#mapToSetAbbrWithSnippedWordAsPath(self.items)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,300 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#buffertag#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#buffertag#getSwitchOrder()
|
||||||
|
return g:fuf_buffertag_switchOrder
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#buffertag#getEditableDataNames()
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#buffertag#renewCache()
|
||||||
|
let s:tagItemsCache = {}
|
||||||
|
let s:tagDataCache = {}
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#buffertag#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#buffertag#onInit()
|
||||||
|
call fuf#defineLaunchCommand('FufBufferTag', s:MODE_NAME, '""',
|
||||||
|
\ [['g:fuf_buffertag_forAll', 0]])
|
||||||
|
call fuf#defineLaunchCommand('FufBufferTagAll', s:MODE_NAME, '""',
|
||||||
|
\ [['g:fuf_buffertag_forAll', 1]])
|
||||||
|
call fuf#defineLaunchCommand('FufBufferTagWithCursorWord', s:MODE_NAME,
|
||||||
|
\ 'expand(''<cword>'')', [['g:fuf_buffertag_forAll', 0]])
|
||||||
|
call fuf#defineLaunchCommand('FufBufferTagAllWithCursorWord', s:MODE_NAME,
|
||||||
|
\ 'expand(''<cword>'')', [['g:fuf_buffertag_forAll', 1]])
|
||||||
|
call fuf#defineLaunchCommand('FufBufferTagWithSelectedText', s:MODE_NAME,
|
||||||
|
\ 'l9#getSelectedText()', [['g:fuf_buffertag_forAll', 0]])
|
||||||
|
call fuf#defineLaunchCommand('FufBufferTagAllWithSelectedText', s:MODE_NAME,
|
||||||
|
\ 'l9#getSelectedText()', [['g:fuf_buffertag_forAll', 1]])
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag_forAll', 0) " private option
|
||||||
|
" the following settings originate from taglist.vim
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__asm' , '--language-force=asm --asm-types=dlmt')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__aspperl' , '--language-force=asp --asp-types=fsv')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__aspvbs' , '--language-force=asp --asp-types=fsv')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__awk' , '--language-force=awk --awk-types=f')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__beta' , '--language-force=beta --beta-types=fsv')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__c' , '--language-force=c --c-types=dgsutvf')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__cpp' , '--language-force=c++ --c++-types=nvdtcgsuf')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__cs' , '--language-force=c# --c#-types=dtncEgsipm')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__cobol' , '--language-force=cobol --cobol-types=dfgpPs')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__eiffel' , '--language-force=eiffel --eiffel-types=cf')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__erlang' , '--language-force=erlang --erlang-types=drmf')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__expect' , '--language-force=tcl --tcl-types=cfp')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__fortran' , '--language-force=fortran --fortran-types=pbceiklmntvfs')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__html' , '--language-force=html --html-types=af')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__java' , '--language-force=java --java-types=pcifm')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__javascript', '--language-force=javascript --javascript-types=f')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__lisp' , '--language-force=lisp --lisp-types=f')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__lua' , '--language-force=lua --lua-types=f')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__make' , '--language-force=make --make-types=m')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__pascal' , '--language-force=pascal --pascal-types=fp')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__perl' , '--language-force=perl --perl-types=clps')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__php' , '--language-force=php --php-types=cdvf')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__python' , '--language-force=python --python-types=cmf')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__rexx' , '--language-force=rexx --rexx-types=s')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__ruby' , '--language-force=ruby --ruby-types=cfFm')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__scheme' , '--language-force=scheme --scheme-types=sf')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__sh' , '--language-force=sh --sh-types=f')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__csh' , '--language-force=sh --sh-types=f')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__zsh' , '--language-force=sh --sh-types=f')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__slang' , '--language-force=slang --slang-types=nf')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__sml' , '--language-force=sml --sml-types=ecsrtvf')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__sql' , '--language-force=sql --sql-types=cFPrstTvfp')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__tcl' , '--language-force=tcl --tcl-types=cfmp')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__vera' , '--language-force=vera --vera-types=cdefgmpPtTvx')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__verilog' , '--language-force=verilog --verilog-types=mcPertwpvf')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__vim' , '--language-force=vim --vim-types=avf')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag__yacc' , '--language-force=yacc --yacc-types=l')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:parseTagLine(line)
|
||||||
|
" tag W:\Win32\SRC7\NCSIM\NCVW32\CUBEFACE.H /^#define CUBEFACE_H$/;" macro line:4
|
||||||
|
let fields = matchlist(a:line, '\v^([^\t]+)\t(.+)\t\/\^(.+)\$\/\;\"\t(.+)\tline\:(\d+)')
|
||||||
|
if empty(fields)
|
||||||
|
return {}
|
||||||
|
endif
|
||||||
|
return {
|
||||||
|
\ 'tag' : fields[1],
|
||||||
|
\ 'fname' : fields[2],
|
||||||
|
\ 'pattern': fields[3],
|
||||||
|
\ 'kind' : fields[4],
|
||||||
|
\ 'lnum' : str2nr(fields[5]),
|
||||||
|
\ }
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
let s:TEMP_VARIABLES_GROUP = expand('<sfile>:p')
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:getFileType(bufNr)
|
||||||
|
let ft = getbufvar(a:bufNr, '&filetype')
|
||||||
|
if !empty(ft) || bufloaded(a:bufNr)
|
||||||
|
return ft
|
||||||
|
endif
|
||||||
|
let ft = getbufvar(a:bufNr, 'fuf_buffertag_filetype')
|
||||||
|
if !empty(ft)
|
||||||
|
return ft
|
||||||
|
endif
|
||||||
|
call l9#tempvariables#set(s:TEMP_VARIABLES_GROUP, '&eventignore', 'FileType')
|
||||||
|
call l9#tempvariables#set(s:TEMP_VARIABLES_GROUP, '&filetype', &filetype)
|
||||||
|
" from taglist.vim
|
||||||
|
execute 'doautocmd filetypedetect BufRead ' . bufname(a:bufNr)
|
||||||
|
let ft = &filetype
|
||||||
|
call l9#tempvariables#end(s:TEMP_VARIABLES_GROUP)
|
||||||
|
call setbufvar(a:bufNr, 'fuf_buffertag_filetype', ft)
|
||||||
|
return ft
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:makeCtagsCmd(bufNr)
|
||||||
|
let ft = s:getFileType(a:bufNr)
|
||||||
|
if !exists('g:fuf_buffertag__{ft}')
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
"
|
||||||
|
let cmd = join([g:fuf_buffertag_ctagsPath,
|
||||||
|
\ '-f - --sort=no --excmd=pattern --fields=nKs',
|
||||||
|
\ g:fuf_buffertag__{ft},
|
||||||
|
\ shellescape(fnamemodify(bufname(a:bufNr), ':p'))])
|
||||||
|
return cmd
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:getTagItems(bufNr)
|
||||||
|
let cmd = s:makeCtagsCmd(a:bufNr)
|
||||||
|
if empty(cmd)
|
||||||
|
return []
|
||||||
|
elseif !exists('s:tagItemsCache[cmd]') ||
|
||||||
|
\ s:tagItemsCache[cmd].time < getftime(expand(bufname(a:bufNr)))
|
||||||
|
let items = split(system(cmd), "\n")
|
||||||
|
if v:shell_error
|
||||||
|
call fuf#echoError([cmd] + items)
|
||||||
|
throw "Command error"
|
||||||
|
endif
|
||||||
|
call map(items, 's:parseTagLine(v:val)')
|
||||||
|
call filter(items, '!empty(v:val)')
|
||||||
|
let s:tagItemsCache[cmd] = {
|
||||||
|
\ 'time' : localtime(),
|
||||||
|
\ 'items' : items,
|
||||||
|
\ }
|
||||||
|
endif
|
||||||
|
return s:tagItemsCache[cmd].items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:makeItem(tag, itemMap)
|
||||||
|
let menu = fnamemodify(a:itemMap[a:tag][0].fname, ':t')
|
||||||
|
\ . ' [' . a:itemMap[a:tag][0].kind . ']'
|
||||||
|
if len(a:itemMap[a:tag]) > 1
|
||||||
|
let menu .= ' (' . len(a:itemMap[a:tag]) . ')'
|
||||||
|
endif
|
||||||
|
let item = fuf#makeNonPathItem(a:tag, menu)
|
||||||
|
return item
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:getTagData(bufNrs)
|
||||||
|
let key = join([0] + sort(copy(a:bufNrs)), "\n")
|
||||||
|
let bufNames = map(copy(a:bufNrs), 'bufname(v:val)')
|
||||||
|
if !exists('s:tagDataCache[key]') ||
|
||||||
|
\ fuf#countModifiedFiles(bufNames, s:tagDataCache[key].time) > 0
|
||||||
|
let itemMap = {}
|
||||||
|
for item in l9#concat(map(copy(a:bufNrs), 's:getTagItems(v:val)'))
|
||||||
|
if !exists('itemMap[item.tag]')
|
||||||
|
let itemMap[item.tag] = []
|
||||||
|
endif
|
||||||
|
call add(itemMap[item.tag], item)
|
||||||
|
endfor
|
||||||
|
let items = sort(keys(itemMap))
|
||||||
|
call map(items, 's:makeItem(v:val, itemMap)')
|
||||||
|
call fuf#mapToSetSerialIndex(items, 1)
|
||||||
|
call map(items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
|
||||||
|
let s:tagDataCache[key] = {
|
||||||
|
\ 'time' : localtime(),
|
||||||
|
\ 'itemMap': itemMap,
|
||||||
|
\ 'items' : items,
|
||||||
|
\ }
|
||||||
|
endif
|
||||||
|
return [s:tagDataCache[key].items, s:tagDataCache[key].itemMap]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:jumpToTag(item, mode)
|
||||||
|
call fuf#openFile(a:item.fname, a:mode, g:fuf_reuseWindow)
|
||||||
|
call cursor(a:item.lnum, 1)
|
||||||
|
normal! zvzz
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(g:fuf_buffertag_prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return self.items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
if !exists('self.itemMap[a:word][0]')
|
||||||
|
call fuf#echoError('Definition not found:' . a:word)
|
||||||
|
return
|
||||||
|
elseif len(self.itemMap[a:word]) == 1
|
||||||
|
let i = 0
|
||||||
|
else
|
||||||
|
let list = map(fuf#mapToSetSerialIndex(copy(self.itemMap[a:word]), 1),
|
||||||
|
\ 'printf(" %2d: %s|%d| [%s] %s",v:val.index, fnamemodify(v:val.fname, ":~:."), v:val.lnum, v:val.kind, v:val.pattern)')
|
||||||
|
let i = inputlist(['Select a definition of "' . a:word . '":'] + list) - 1
|
||||||
|
endif
|
||||||
|
if 0 <= i && i < len(self.itemMap[a:word])
|
||||||
|
call s:jumpToTag(self.itemMap[a:word][i], a:mode)
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
if g:fuf_buffertag_forAll
|
||||||
|
let bufNrs = filter(range(1, bufnr('$')), 'buflisted(v:val)')
|
||||||
|
else
|
||||||
|
let bufNrs = [self.bufNrPrev]
|
||||||
|
endif
|
||||||
|
let [self.items, self.itemMap] = s:getTagData(bufNrs)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,137 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#callbackfile#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#callbackfile#getSwitchOrder()
|
||||||
|
return -1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#callbackfile#getEditableDataNames()
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#callbackfile#renewCache()
|
||||||
|
let s:cache = {}
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#callbackfile#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#callbackfile#onInit()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#callbackfile#launch(initialPattern, partialMatching, prompt, exclude, listener)
|
||||||
|
let s:prompt = (empty(a:prompt) ? '>' : a:prompt)
|
||||||
|
let s:exclude = a:exclude
|
||||||
|
let s:listener = a:listener
|
||||||
|
call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:enumItems(dir)
|
||||||
|
let key = getcwd() . g:fuf_ignoreCase . s:exclude . "\n" . a:dir
|
||||||
|
if !exists('s:cache[key]')
|
||||||
|
let s:cache[key] = fuf#enumExpandedDirsEntries(a:dir, s:exclude)
|
||||||
|
if isdirectory(a:dir)
|
||||||
|
call insert(s:cache[key], fuf#makePathItem(a:dir . '.', '', 0))
|
||||||
|
endif
|
||||||
|
call fuf#mapToSetSerialIndex(s:cache[key], 1)
|
||||||
|
call fuf#mapToSetAbbrWithSnippedWordAsPath(s:cache[key])
|
||||||
|
endif
|
||||||
|
return s:cache[key]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(s:prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return a:enteredPattern =~# '[^/\\]$'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPathTail',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight())
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
let items = copy(s:enumItems(fuf#splitPath(a:patternPrimary).head))
|
||||||
|
return filter(items, 'bufnr("^" . v:val.word . "$") != self.bufNrPrev')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
call s:listener.onComplete(a:word, a:mode)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
if !a:opened && exists('s:listener.onAbort()')
|
||||||
|
call s:listener.onAbort()
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,139 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#callbackitem#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#callbackitem#getSwitchOrder()
|
||||||
|
return -1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#callbackitem#getEditableDataNames()
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#callbackitem#renewCache()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#callbackitem#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#callbackitem#onInit()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#callbackitem#launch(initialPattern, partialMatching, prompt, listener, items, forPath)
|
||||||
|
let s:prompt = (empty(a:prompt) ? '>' : a:prompt)
|
||||||
|
let s:listener = a:listener
|
||||||
|
let s:forPath = a:forPath
|
||||||
|
let s:items = copy(a:items)
|
||||||
|
if s:forPath
|
||||||
|
call map(s:items, 'fuf#makePathItem(v:val, "", 1)')
|
||||||
|
call fuf#mapToSetSerialIndex(s:items, 1)
|
||||||
|
call fuf#mapToSetAbbrWithSnippedWordAsPath(s:items)
|
||||||
|
else
|
||||||
|
call map(s:items, 'fuf#makeNonPathItem(v:val, "")')
|
||||||
|
call fuf#mapToSetSerialIndex(s:items, 1)
|
||||||
|
call map(s:items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
|
||||||
|
endif
|
||||||
|
call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(s:prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
if s:forPath
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endif
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
let parser = (s:forPath
|
||||||
|
\ ? 's:interpretPrimaryPatternForPath'
|
||||||
|
\ : 's:interpretPrimaryPatternForNonPath')
|
||||||
|
return fuf#makePatternSet(a:patternBase, parser, self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
if s:forPath
|
||||||
|
return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight())
|
||||||
|
endif
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return s:items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
call s:listener.onComplete(a:word, a:mode)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
if !a:opened && exists('s:listener.onAbort()')
|
||||||
|
call s:listener.onAbort()
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,172 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#changelist#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#changelist#getSwitchOrder()
|
||||||
|
return g:fuf_changelist_switchOrder
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#changelist#getEditableDataNames()
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#changelist#renewCache()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#changelist#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#changelist#onInit()
|
||||||
|
call fuf#defineLaunchCommand('FufChangeList', s:MODE_NAME, '""', [])
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:getChangesLines()
|
||||||
|
redir => result
|
||||||
|
:silent changes
|
||||||
|
redir END
|
||||||
|
return split(result, "\n")
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:parseChangesLine(line)
|
||||||
|
" return matchlist(a:line, '^\(.\)\s\+\(\d\+\)\s\(.*\)$')
|
||||||
|
let elements = matchlist(a:line, '\v^(.)\s*(\d+)\s+(\d+)\s+(\d+)\s*(.*)$')
|
||||||
|
if empty(elements)
|
||||||
|
return {}
|
||||||
|
endif
|
||||||
|
return {
|
||||||
|
\ 'prefix': elements[1],
|
||||||
|
\ 'count' : elements[2],
|
||||||
|
\ 'lnum' : elements[3],
|
||||||
|
\ 'text' : printf('|%d:%d|%s', elements[3], elements[4], elements[5]),
|
||||||
|
\ }
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:makeItem(line)
|
||||||
|
let parsed = s:parseChangesLine(a:line)
|
||||||
|
if empty(parsed)
|
||||||
|
return {}
|
||||||
|
endif
|
||||||
|
let item = fuf#makeNonPathItem(parsed.text, '')
|
||||||
|
let item.abbrPrefix = parsed.prefix
|
||||||
|
let item.lnum = parsed.lnum
|
||||||
|
return item
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(g:fuf_changelist_prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
let items = filter(copy(self.items), 'v:val.word ==# a:word')
|
||||||
|
if empty(items)
|
||||||
|
return []
|
||||||
|
endif
|
||||||
|
let lines = fuf#getFileLines(self.bufNrPrev)
|
||||||
|
return fuf#makePreviewLinesAround(
|
||||||
|
\ lines, [items[0].lnum - 1], a:count, self.getPreviewHeight())
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return self.items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
call fuf#prejump(a:mode)
|
||||||
|
let older = 0
|
||||||
|
for line in reverse(s:getChangesLines())
|
||||||
|
if stridx(line, '>') == 0
|
||||||
|
let older = 1
|
||||||
|
endif
|
||||||
|
let parsed = s:parseChangesLine(line)
|
||||||
|
if !empty(parsed) && parsed.text ==# a:word
|
||||||
|
if parsed.count != 0
|
||||||
|
execute 'normal! ' . parsed.count . (older ? 'g;' : 'g,') . 'zvzz'
|
||||||
|
endif
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
let self.items = s:getChangesLines()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
call map(self.items, 's:makeItem(v:val)')
|
||||||
|
call filter(self.items, '!empty(v:val)')
|
||||||
|
call reverse(self.items)
|
||||||
|
call fuf#mapToSetSerialIndex(self.items, 1)
|
||||||
|
call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
||||||
|
|
|
@ -0,0 +1,199 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#coveragefile#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#coveragefile#getSwitchOrder()
|
||||||
|
return g:fuf_coveragefile_switchOrder
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#coveragefile#getEditableDataNames()
|
||||||
|
return ['coverages']
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#coveragefile#renewCache()
|
||||||
|
let s:cache = {}
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#coveragefile#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#coveragefile#onInit()
|
||||||
|
call fuf#defineLaunchCommand('FufCoverageFile', s:MODE_NAME, '""', [])
|
||||||
|
call l9#defineVariableDefault('g:fuf_coveragefile_name', '') " private option
|
||||||
|
command! -bang -narg=0 FufCoverageFileRegister call s:registerCoverage()
|
||||||
|
command! -bang -narg=? FufCoverageFileChange call s:changeCoverage(<q-args>)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:enumItems()
|
||||||
|
let key = join([getcwd(), g:fuf_ignoreCase, g:fuf_coveragefile_exclude,
|
||||||
|
\ g:fuf_coveragefile_globPatterns], "\n")
|
||||||
|
if !exists('s:cache[key]')
|
||||||
|
let s:cache[key] = l9#concat(map(copy(g:fuf_coveragefile_globPatterns),
|
||||||
|
\ 'fuf#glob(v:val)'))
|
||||||
|
call filter(s:cache[key], 'filereadable(v:val)') " filter out directories
|
||||||
|
call map(s:cache[key], 'fuf#makePathItem(fnamemodify(v:val, ":~:."), "", 0)')
|
||||||
|
if len(g:fuf_coveragefile_exclude)
|
||||||
|
call filter(s:cache[key], 'v:val.word !~ g:fuf_coveragefile_exclude')
|
||||||
|
endif
|
||||||
|
call fuf#mapToSetSerialIndex(s:cache[key], 1)
|
||||||
|
call fuf#mapToSetAbbrWithSnippedWordAsPath(s:cache[key])
|
||||||
|
endif
|
||||||
|
return s:cache[key]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:registerCoverage()
|
||||||
|
let patterns = []
|
||||||
|
while 1
|
||||||
|
let pattern = l9#inputHl('Question', '[fuf] Glob pattern for coverage (<Esc> and end):',
|
||||||
|
\ '', 'file')
|
||||||
|
if pattern !~ '\S'
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
call add(patterns, pattern)
|
||||||
|
endwhile
|
||||||
|
if empty(patterns)
|
||||||
|
call fuf#echoWarning('Canceled')
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
echo '[fuf] patterns: ' . string(patterns)
|
||||||
|
let name = l9#inputHl('Question', '[fuf] Coverage name:')
|
||||||
|
if name !~ '\S'
|
||||||
|
call fuf#echoWarning('Canceled')
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
let coverages = fuf#loadDataFile(s:MODE_NAME, 'coverages')
|
||||||
|
call insert(coverages, {'name': name, 'patterns': patterns})
|
||||||
|
call fuf#saveDataFile(s:MODE_NAME, 'coverages', coverages)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:createChangeCoverageListener()
|
||||||
|
let listener = {}
|
||||||
|
|
||||||
|
function listener.onComplete(name, method)
|
||||||
|
call s:changeCoverage(a:name)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
return listener
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:changeCoverage(name)
|
||||||
|
let coverages = fuf#loadDataFile(s:MODE_NAME, 'coverages')
|
||||||
|
if a:name !~ '\S'
|
||||||
|
let names = map(copy(coverages), 'v:val.name')
|
||||||
|
call fuf#callbackitem#launch('', 0, '>Coverage>', s:createChangeCoverageListener(), names, 0)
|
||||||
|
return
|
||||||
|
else
|
||||||
|
let name = a:name
|
||||||
|
endif
|
||||||
|
call filter(coverages, 'v:val.name ==# name')
|
||||||
|
if empty(coverages)
|
||||||
|
call fuf#echoError('Coverage not found: ' . name)
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
call fuf#setOneTimeVariables(
|
||||||
|
\ ['g:fuf_coveragefile_globPatterns', coverages[0].patterns],
|
||||||
|
\ ['g:fuf_coveragefile_name' , a:name]
|
||||||
|
\ )
|
||||||
|
FufCoverageFile
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
let nameString = (empty(g:fuf_coveragefile_name) ? ''
|
||||||
|
\ : '[' . g:fuf_coveragefile_name . ']')
|
||||||
|
return fuf#formatPrompt(g:fuf_coveragefile_prompt, self.partialMatching,
|
||||||
|
\ nameString)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight())
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return self.items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
" NOTE: Comparing filenames is faster than bufnr('^' . fname . '$')
|
||||||
|
let bufNamePrev = fnamemodify(bufname(self.bufNrPrev), ':~:.')
|
||||||
|
let self.items = copy(s:enumItems())
|
||||||
|
call filter(self.items, 'v:val.word !=# bufNamePrev')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,132 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#dir#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#dir#getSwitchOrder()
|
||||||
|
return g:fuf_dir_switchOrder
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#dir#getEditableDataNames()
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#dir#renewCache()
|
||||||
|
let s:cache = {}
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#dir#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#dir#onInit()
|
||||||
|
call fuf#defineLaunchCommand('FufDir' , s:MODE_NAME, '""', [])
|
||||||
|
call fuf#defineLaunchCommand('FufDirWithFullCwd' , s:MODE_NAME, 'fnamemodify(getcwd(), '':p'')', [])
|
||||||
|
call fuf#defineLaunchCommand('FufDirWithCurrentBufferDir', s:MODE_NAME, 'expand(''%:~:.'')[:-1-len(expand(''%:~:.:t''))]', [])
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:enumItems(dir)
|
||||||
|
let key = getcwd() . g:fuf_ignoreCase . g:fuf_dir_exclude . "\n" . a:dir
|
||||||
|
if !exists('s:cache[key]')
|
||||||
|
let s:cache[key] = fuf#enumExpandedDirsEntries(a:dir, g:fuf_dir_exclude)
|
||||||
|
call filter(s:cache[key], 'v:val.word =~# ''[/\\]$''')
|
||||||
|
if isdirectory(a:dir)
|
||||||
|
call insert(s:cache[key], fuf#makePathItem(a:dir . '.', '', 0))
|
||||||
|
endif
|
||||||
|
call fuf#mapToSetSerialIndex(s:cache[key], 1)
|
||||||
|
call fuf#mapToSetAbbrWithSnippedWordAsPath(s:cache[key])
|
||||||
|
endif
|
||||||
|
return s:cache[key]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(g:fuf_dir_prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return a:enteredPattern =~# '[^/\\]$'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPathTail',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
return fuf#makePreviewLinesAround(
|
||||||
|
\ fuf#glob(fnamemodify(a:word, ':p') . '*'),
|
||||||
|
\ [], a:count, self.getPreviewHeight())
|
||||||
|
return
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return s:enumItems(fuf#splitPath(a:patternPrimary).head)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
execute ':cd ' . fnameescape(a:word)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,139 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#file#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#file#getSwitchOrder()
|
||||||
|
return g:fuf_file_switchOrder
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#file#getEditableDataNames()
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#file#renewCache()
|
||||||
|
let s:cache = {}
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#file#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#file#onInit()
|
||||||
|
call fuf#defineLaunchCommand('FufFile' , s:MODE_NAME, '""', [])
|
||||||
|
call fuf#defineLaunchCommand('FufFileWithFullCwd' , s:MODE_NAME, 'fnamemodify(getcwd(), '':p'')', [])
|
||||||
|
call fuf#defineLaunchCommand('FufFileWithCurrentBufferDir', s:MODE_NAME, 'expand(''%:~:.'')[:-1-len(expand(''%:~:.:t''))]', [])
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:enumItems(dir)
|
||||||
|
let key = join([getcwd(), g:fuf_ignoreCase, g:fuf_file_exclude, a:dir], "\n")
|
||||||
|
if !exists('s:cache[key]')
|
||||||
|
let s:cache[key] = fuf#enumExpandedDirsEntries(a:dir, g:fuf_file_exclude)
|
||||||
|
call fuf#mapToSetSerialIndex(s:cache[key], 1)
|
||||||
|
call fuf#mapToSetAbbrWithSnippedWordAsPath(s:cache[key])
|
||||||
|
endif
|
||||||
|
return s:cache[key]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:enumNonCurrentItems(dir, bufNrPrev, cache)
|
||||||
|
let key = a:dir . 'AVOIDING EMPTY KEY'
|
||||||
|
if !exists('a:cache[key]')
|
||||||
|
" NOTE: Comparing filenames is faster than bufnr('^' . fname . '$')
|
||||||
|
let bufNamePrev = bufname(a:bufNrPrev)
|
||||||
|
let a:cache[key] =
|
||||||
|
\ filter(copy(s:enumItems(a:dir)), 'v:val.word !=# bufNamePrev')
|
||||||
|
endif
|
||||||
|
return a:cache[key]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(g:fuf_file_prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return a:enteredPattern =~# '[^/\\]$'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPathTail',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight())
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return s:enumNonCurrentItems(
|
||||||
|
\ fuf#splitPath(a:patternPrimary).head, self.bufNrPrev, self.cache)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
let self.cache = {}
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,123 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givencmd#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givencmd#getSwitchOrder()
|
||||||
|
return -1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givencmd#getEditableDataNames()
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givencmd#renewCache()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givencmd#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givencmd#onInit()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givencmd#launch(initialPattern, partialMatching, prompt, items)
|
||||||
|
let s:prompt = (empty(a:prompt) ? '>' : a:prompt)
|
||||||
|
let s:items = copy(a:items)
|
||||||
|
call map(s:items, 'fuf#makeNonPathItem(v:val, "")')
|
||||||
|
call fuf#mapToSetSerialIndex(s:items, 1)
|
||||||
|
call map(s:items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
|
||||||
|
call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(s:prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return s:items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
if a:word[0] =~# '[:/?]'
|
||||||
|
call histadd(a:word[0], a:word[1:])
|
||||||
|
endif
|
||||||
|
call feedkeys(a:word . "\<CR>", 'n')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,123 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givendir#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givendir#getSwitchOrder()
|
||||||
|
return -1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givendir#getEditableDataNames()
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givendir#renewCache()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givendir#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givendir#onInit()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givendir#launch(initialPattern, partialMatching, prompt, items)
|
||||||
|
let s:prompt = (empty(a:prompt) ? '>' : a:prompt)
|
||||||
|
let s:items = map(copy(a:items), 'substitute(v:val, ''[/\\]\?$'', "", "")')
|
||||||
|
let s:items = map(s:items, 'fuf#makePathItem(v:val, "", 0)')
|
||||||
|
call fuf#mapToSetSerialIndex(s:items, 1)
|
||||||
|
call fuf#mapToSetAbbrWithSnippedWordAsPath(s:items)
|
||||||
|
call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(s:prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
return fuf#makePreviewLinesAround(
|
||||||
|
\ fuf#glob(fnamemodify(a:word, ':p') . '*'),
|
||||||
|
\ [], a:count, self.getPreviewHeight())
|
||||||
|
return
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return s:items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
execute ':cd ' . fnameescape(a:word)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,121 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givenfile#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givenfile#getSwitchOrder()
|
||||||
|
return -1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givenfile#getEditableDataNames()
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givenfile#renewCache()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givenfile#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givenfile#onInit()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#givenfile#launch(initialPattern, partialMatching, prompt, items)
|
||||||
|
let s:prompt = (empty(a:prompt) ? '>' : a:prompt)
|
||||||
|
let s:items = map(copy(a:items), 'fuf#makePathItem(v:val, "", 0)')
|
||||||
|
call fuf#mapToSetSerialIndex(s:items, 1)
|
||||||
|
call map(s:items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
|
||||||
|
call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(s:prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight())
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return s:items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,198 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#help#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#help#getSwitchOrder()
|
||||||
|
return g:fuf_help_switchOrder
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#help#getEditableDataNames()
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#help#renewCache()
|
||||||
|
let s:cache = {}
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#help#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#help#onInit()
|
||||||
|
call fuf#defineLaunchCommand('FufHelp' , s:MODE_NAME, '""', [])
|
||||||
|
call fuf#defineLaunchCommand('FufHelpWithCursorWord', s:MODE_NAME, 'expand(''<cword>'')', [])
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:getCurrentHelpTagFiles()
|
||||||
|
let prefix = 'doc' . l9#getPathSeparator()
|
||||||
|
let tagFiles = split(globpath(&runtimepath, prefix . 'tags' ), "\n")
|
||||||
|
\ + split(globpath(&runtimepath, prefix . 'tags-??'), "\n")
|
||||||
|
return sort(map(tagFiles, 'fnamemodify(v:val, ":p")'))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:parseHelpTagEntry(line, tagFile)
|
||||||
|
let elements = split(a:line, "\t")
|
||||||
|
if len(elements) != 3 || elements[0][0] ==# '!'
|
||||||
|
return {}
|
||||||
|
endif
|
||||||
|
let suffix = matchstr(a:tagFile, '-\zs..$')
|
||||||
|
if empty(suffix)
|
||||||
|
let suffix = '@en'
|
||||||
|
else
|
||||||
|
let suffix = '@' . suffix
|
||||||
|
endif
|
||||||
|
let dir = fnamemodify(a:tagFile, ':h') . l9#getPathSeparator()
|
||||||
|
return {
|
||||||
|
\ 'word' : elements[0] . suffix,
|
||||||
|
\ 'path' : dir . elements[1],
|
||||||
|
\ 'pattern': elements[2][1:],
|
||||||
|
\ }
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:getHelpTagEntries(tagFile)
|
||||||
|
let names = map(l9#readFile(a:tagFile), 's:parseHelpTagEntry(v:val, a:tagFile)')
|
||||||
|
return filter(names, '!empty(v:val)')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:parseHelpTagFiles(tagFiles, key)
|
||||||
|
let cacheName = 'cache-' . l9#hash224(a:key)
|
||||||
|
let cacheTime = fuf#getDataFileTime(s:MODE_NAME, cacheName)
|
||||||
|
if cacheTime != -1 && fuf#countModifiedFiles(a:tagFiles, cacheTime) == 0
|
||||||
|
return fuf#loadDataFile(s:MODE_NAME, cacheName)
|
||||||
|
endif
|
||||||
|
let items = l9#unique(l9#concat(map(copy(a:tagFiles), 's:getHelpTagEntries(v:val)')))
|
||||||
|
let items = map(items, 'extend(v:val, fuf#makeNonPathItem(v:val.word, ""))')
|
||||||
|
call fuf#mapToSetSerialIndex(items, 1)
|
||||||
|
let items = map(items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
|
||||||
|
call fuf#saveDataFile(s:MODE_NAME, cacheName, items)
|
||||||
|
return items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:enumHelpTags(tagFiles)
|
||||||
|
if !len(a:tagFiles)
|
||||||
|
return []
|
||||||
|
endif
|
||||||
|
let key = join([g:fuf_ignoreCase] + a:tagFiles, "\n")
|
||||||
|
if !exists('s:cache[key]') || fuf#countModifiedFiles(a:tagFiles, s:cache[key].time)
|
||||||
|
let s:cache[key] = {
|
||||||
|
\ 'time' : localtime(),
|
||||||
|
\ 'items' : s:parseHelpTagFiles(a:tagFiles, key)
|
||||||
|
\ }
|
||||||
|
endif
|
||||||
|
return s:cache[key].items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:getMatchingIndex(lines, pattern)
|
||||||
|
if empty(a:pattern)
|
||||||
|
return -1
|
||||||
|
endif
|
||||||
|
for i in range(len(a:lines))
|
||||||
|
if stridx(a:lines[i], a:pattern) >= 0
|
||||||
|
return i
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
return -1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(g:fuf_help_prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
let items = filter(copy(s:enumHelpTags(self.tagFiles)), 'v:val.word ==# a:word')
|
||||||
|
if empty(items)
|
||||||
|
return []
|
||||||
|
endif
|
||||||
|
let lines = fuf#getFileLines(items[0].path)
|
||||||
|
let index = s:getMatchingIndex(lines, items[0].pattern)
|
||||||
|
return [items[0].path . ':'] + fuf#makePreviewLinesAround(
|
||||||
|
\ lines, (index < 0 ? [] : [index]), a:count, self.getPreviewHeight() - 1)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return s:enumHelpTags(self.tagFiles)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
call fuf#openHelp(a:word, a:mode)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
let self.tagFiles = s:getCurrentHelpTagFiles()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,182 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#jumplist#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#jumplist#getSwitchOrder()
|
||||||
|
return g:fuf_jumplist_switchOrder
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#jumplist#getEditableDataNames()
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#jumplist#renewCache()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#jumplist#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#jumplist#onInit()
|
||||||
|
call fuf#defineLaunchCommand('FufJumpList', s:MODE_NAME, '""', [])
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:getJumpsLines()
|
||||||
|
redir => result
|
||||||
|
:silent jumps
|
||||||
|
redir END
|
||||||
|
return split(result, "\n")
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:parseJumpsLine(line, bufnrPrev)
|
||||||
|
"return matchlist(a:line, '^\(.\)\s\+\(\d\+\)\s\(.*\)$')
|
||||||
|
let elements = matchlist(a:line, '\v^(.)\s*(\d+)\s+(\d+)\s+(\d+)\s*(.*)$')
|
||||||
|
if empty(elements)
|
||||||
|
return {}
|
||||||
|
endif
|
||||||
|
let linePrevBuffer = join(getbufline(a:bufnrPrev, elements[3]))
|
||||||
|
if stridx(linePrevBuffer, elements[5]) >= 0
|
||||||
|
let fname = bufname(a:bufnrPrev)
|
||||||
|
let text = elements[5]
|
||||||
|
else
|
||||||
|
let fname = elements[5]
|
||||||
|
let text = join(getbufline('^' . elements[5] . '$', elements[3]))
|
||||||
|
endif
|
||||||
|
return {
|
||||||
|
\ 'prefix': elements[1],
|
||||||
|
\ 'count' : elements[2],
|
||||||
|
\ 'lnum' : elements[3],
|
||||||
|
\ 'fname' : fname,
|
||||||
|
\ 'text' : printf('%s|%d:%d|%s', fname, elements[3], elements[4], text),
|
||||||
|
\ }
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:makeItem(line, bufnrPrev)
|
||||||
|
let parsed = s:parseJumpsLine(a:line, a:bufnrPrev)
|
||||||
|
if empty(parsed)
|
||||||
|
return {}
|
||||||
|
endif
|
||||||
|
let item = fuf#makeNonPathItem(parsed.text, '')
|
||||||
|
let item.abbrPrefix = parsed.prefix
|
||||||
|
let item.lnum = parsed.lnum
|
||||||
|
let item.fname = parsed.fname
|
||||||
|
return item
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(g:fuf_jumplist_prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
let items = filter(copy(self.items), 'v:val.word ==# a:word')
|
||||||
|
if empty(items)
|
||||||
|
return []
|
||||||
|
endif
|
||||||
|
let lines = fuf#getFileLines(items[0].fname)
|
||||||
|
return fuf#makePreviewLinesAround(
|
||||||
|
\ lines, [items[0].lnum - 1], a:count, self.getPreviewHeight())
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return self.items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
call fuf#prejump(a:mode)
|
||||||
|
let older = 0
|
||||||
|
for line in reverse(s:getJumpsLines())
|
||||||
|
if stridx(line, '>') == 0
|
||||||
|
let older = 1
|
||||||
|
endif
|
||||||
|
let parsed = s:parseJumpsLine(line, self.bufNrPrev)
|
||||||
|
if !empty(parsed) && parsed.text ==# a:word
|
||||||
|
if parsed.count != 0
|
||||||
|
execute 'normal! ' . parsed.count . (older ? "\<C-o>" : "\<C-i>") . 'zvzz'
|
||||||
|
endif
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
let self.items = s:getJumpsLines()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
call map(self.items, 's:makeItem(v:val, self.bufNrPrev)')
|
||||||
|
call filter(self.items, '!empty(v:val)')
|
||||||
|
call reverse(self.items)
|
||||||
|
call fuf#mapToSetSerialIndex(self.items, 1)
|
||||||
|
call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
||||||
|
|
|
@ -0,0 +1,135 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#line#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#line#getSwitchOrder()
|
||||||
|
return g:fuf_line_switchOrder
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#line#getEditableDataNames()
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#line#renewCache()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#line#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#line#onInit()
|
||||||
|
call fuf#defineLaunchCommand('FufLine', s:MODE_NAME, '""', [])
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
let s:OPEN_TYPE_DELETE = -1
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(g:fuf_line_prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
let items = filter(copy(self.items), 'v:val.word ==# a:word')
|
||||||
|
if empty(items)
|
||||||
|
return []
|
||||||
|
endif
|
||||||
|
let lines = fuf#getFileLines(self.bufNrPrev)
|
||||||
|
return fuf#makePreviewLinesAround(
|
||||||
|
\ lines, [items[0].index - 1], a:count, self.getPreviewHeight())
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return self.items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
call fuf#prejump(a:mode)
|
||||||
|
call filter(self.items, 'v:val.word ==# a:word')
|
||||||
|
if empty(self.items)
|
||||||
|
return
|
||||||
|
execute 'cc ' . self.items[0].index
|
||||||
|
endif
|
||||||
|
call cursor(self.items[0].index, 0)
|
||||||
|
normal! zvzz
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
let tab = repeat(' ', getbufvar(self.bufNrPrev, '&tabstop'))
|
||||||
|
let self.items = getbufline(self.bufNrPrev, 1, '$')
|
||||||
|
let lnumFormat = '%' . len(string(len(self.items) + 1)) . 'd|'
|
||||||
|
for i in range(len(self.items))
|
||||||
|
let self.items[i] = printf(lnumFormat, i + 1)
|
||||||
|
\ . substitute(self.items[i], "\t", tab, 'g')
|
||||||
|
endfor
|
||||||
|
call map(self.items, 'fuf#makeNonPathItem(v:val, "")')
|
||||||
|
call fuf#mapToSetSerialIndex(self.items, 1)
|
||||||
|
call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 0)')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,134 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#mrucmd#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#mrucmd#getSwitchOrder()
|
||||||
|
return g:fuf_mrucmd_switchOrder
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#mrucmd#getEditableDataNames()
|
||||||
|
return ['items']
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#mrucmd#renewCache()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#mrucmd#requiresOnCommandPre()
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#mrucmd#onInit()
|
||||||
|
call fuf#defineLaunchCommand('FufMruCmd', s:MODE_NAME, '""', [])
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#mrucmd#onCommandPre(cmd)
|
||||||
|
if getcmdtype() =~# '^[:/?]'
|
||||||
|
call s:updateInfo(a:cmd)
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:updateInfo(cmd)
|
||||||
|
let items = fuf#loadDataFile(s:MODE_NAME, 'items')
|
||||||
|
let items = fuf#updateMruList(
|
||||||
|
\ items, { 'word' : a:cmd, 'time' : localtime() },
|
||||||
|
\ g:fuf_mrucmd_maxItem, g:fuf_mrucmd_exclude)
|
||||||
|
call fuf#saveDataFile(s:MODE_NAME, 'items', items)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(g:fuf_mrucmd_prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return self.items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
call s:updateInfo(a:word)
|
||||||
|
call histadd(a:word[0], a:word[1:])
|
||||||
|
call feedkeys(a:word . "\<CR>", 'n')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
let self.items = fuf#loadDataFile(s:MODE_NAME, 'items')
|
||||||
|
call map(self.items, 'fuf#makeNonPathItem(v:val.word, strftime(g:fuf_timeFormat, v:val.time))')
|
||||||
|
call fuf#mapToSetSerialIndex(self.items, 1)
|
||||||
|
call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,234 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#mrufile#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#mrufile#getSwitchOrder()
|
||||||
|
return g:fuf_mrufile_switchOrder
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#mrufile#getEditableDataNames()
|
||||||
|
return ['items', 'itemdirs']
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#mrufile#renewCache()
|
||||||
|
let s:cache = {}
|
||||||
|
let s:aroundCache = {}
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#mrufile#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#mrufile#onInit()
|
||||||
|
call fuf#defineLaunchCommand('FufMruFile', s:MODE_NAME, '""', [])
|
||||||
|
call fuf#defineLaunchCommand('FufMruFileInCwd', s:MODE_NAME,
|
||||||
|
\ '""', [['g:fuf_mrufile_underCwd', 1]])
|
||||||
|
call l9#defineVariableDefault('g:fuf_mrufile_underCwd', 0) " private option
|
||||||
|
call l9#defineVariableDefault('g:fuf_mrufile_searchAroundLevel', -1) " private option
|
||||||
|
augroup fuf#mrufile
|
||||||
|
autocmd!
|
||||||
|
autocmd BufEnter * call s:updateData()
|
||||||
|
autocmd BufWritePost * call s:updateData()
|
||||||
|
augroup END
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
let s:OPEN_TYPE_EXPAND = -1
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:updateData()
|
||||||
|
if !empty(&buftype) || !filereadable(expand('%'))
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
let items = fuf#loadDataFile(s:MODE_NAME, 'items')
|
||||||
|
let items = fuf#updateMruList(
|
||||||
|
\ items, { 'word' : expand('%:p'), 'time' : localtime() },
|
||||||
|
\ g:fuf_mrufile_maxItem, g:fuf_mrufile_exclude)
|
||||||
|
call fuf#saveDataFile(s:MODE_NAME, 'items', items)
|
||||||
|
call s:removeItemFromCache(expand('%:p'))
|
||||||
|
let itemDirs = fuf#loadDataFile(s:MODE_NAME, 'itemdirs')
|
||||||
|
let itemDirs = fuf#updateMruList(
|
||||||
|
\ itemDirs, { 'word' : expand('%:p:h') },
|
||||||
|
\ g:fuf_mrufile_maxItemDir, g:fuf_mrufile_exclude)
|
||||||
|
call fuf#saveDataFile(s:MODE_NAME, 'itemdirs', itemDirs)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:removeItemFromCache(word)
|
||||||
|
for items in values(s:cache)
|
||||||
|
if exists('items[a:word]')
|
||||||
|
unlet items[a:word]
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" returns empty value if invalid item
|
||||||
|
function s:formatItemUsingCache(item)
|
||||||
|
if a:item.word !~ '\S'
|
||||||
|
return {}
|
||||||
|
endif
|
||||||
|
if !exists('s:cache[a:item.word]')
|
||||||
|
if filereadable(a:item.word)
|
||||||
|
let s:cache[a:item.word] = fuf#makePathItem(
|
||||||
|
\ fnamemodify(a:item.word, ':p:~'), strftime(g:fuf_timeFormat, a:item.time), 0)
|
||||||
|
else
|
||||||
|
let s:cache[a:item.word] = {}
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
return s:cache[a:item.word]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:expandSearchDir(dir, level)
|
||||||
|
let dirs = [a:dir]
|
||||||
|
let dirPrev = a:dir
|
||||||
|
for i in range(a:level)
|
||||||
|
let dirPrev = l9#concatPaths([dirPrev, '*'])
|
||||||
|
call add(dirs, dirPrev)
|
||||||
|
endfor
|
||||||
|
let dirPrev = a:dir
|
||||||
|
for i in range(a:level)
|
||||||
|
let dirPrevPrev = dirPrev
|
||||||
|
let dirPrev = fnamemodify(dirPrev, ':h')
|
||||||
|
if dirPrevPrev ==# dirPrev
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
call add(dirs, dirPrev)
|
||||||
|
endfor
|
||||||
|
return dirs
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:listAroundFiles(dir)
|
||||||
|
if !exists('s:aroundCache[a:dir]')
|
||||||
|
let s:aroundCache[a:dir] = [a:dir] +
|
||||||
|
\ fuf#glob(l9#concatPaths([a:dir, '*' ])) +
|
||||||
|
\ fuf#glob(l9#concatPaths([a:dir, '.*']))
|
||||||
|
call filter(s:aroundCache[a:dir], 'filereadable(v:val)')
|
||||||
|
call map(s:aroundCache[a:dir], 'fuf#makePathItem(fnamemodify(v:val, ":~"), "", 0)')
|
||||||
|
if len(g:fuf_mrufile_exclude)
|
||||||
|
call filter(s:aroundCache[a:dir], 'v:val.word !~ g:fuf_mrufile_exclude')
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
return s:aroundCache[a:dir]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
let cwdString = (g:fuf_mrufile_underCwd ? '[CWD]' : '')
|
||||||
|
let levelString = (g:fuf_mrufile_searchAroundLevel < 0 ? ''
|
||||||
|
\ : '[Around:' . g:fuf_mrufile_searchAroundLevel . ']')
|
||||||
|
return fuf#formatPrompt(g:fuf_mrufile_prompt, self.partialMatching, cwdString . levelString)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight())
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return self.items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
if a:mode ==# s:OPEN_TYPE_EXPAND
|
||||||
|
let nextLevel = (self.searchAroundLevel < 0 ? 0 : self.searchAroundLevel + 1)
|
||||||
|
call fuf#setOneTimeVariables(['g:fuf_mrufile_searchAroundLevel', nextLevel])
|
||||||
|
let self.reservedMode = self.getModeName()
|
||||||
|
return
|
||||||
|
else
|
||||||
|
call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow)
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
let self.searchAroundLevel = g:fuf_mrufile_searchAroundLevel
|
||||||
|
call fuf#defineKeyMappingInHandler(g:fuf_mrufile_keyExpand,
|
||||||
|
\ 'onCr(' . s:OPEN_TYPE_EXPAND . ')')
|
||||||
|
if self.searchAroundLevel < 0
|
||||||
|
let self.items = fuf#loadDataFile(s:MODE_NAME, 'items')
|
||||||
|
call map(self.items, 's:formatItemUsingCache(v:val)')
|
||||||
|
else
|
||||||
|
let self.items = fuf#loadDataFile(s:MODE_NAME, 'itemdirs')
|
||||||
|
call map(self.items, 's:expandSearchDir(v:val.word, g:fuf_mrufile_searchAroundLevel)')
|
||||||
|
let self.items = l9#concat(self.items)
|
||||||
|
let self.items = l9#unique(self.items)
|
||||||
|
call map(self.items, 's:listAroundFiles(v:val)')
|
||||||
|
let self.items = l9#concat(self.items)
|
||||||
|
endif
|
||||||
|
" NOTE: Comparing filenames is faster than bufnr('^' . fname . '$')
|
||||||
|
let bufNamePrev = fnamemodify(bufname(self.bufNrPrev), ':p:~')
|
||||||
|
call filter(self.items, '!empty(v:val) && v:val.word !=# bufNamePrev')
|
||||||
|
if g:fuf_mrufile_underCwd
|
||||||
|
let cwd = fnamemodify(getcwd(), ':p:~')
|
||||||
|
call filter(self.items, 'stridx(v:val.word, cwd) == 0')
|
||||||
|
endif
|
||||||
|
call fuf#mapToSetSerialIndex(self.items, 1)
|
||||||
|
call fuf#mapToSetAbbrWithSnippedWordAsPath(self.items)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,154 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#quickfix#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#quickfix#getSwitchOrder()
|
||||||
|
return g:fuf_quickfix_switchOrder
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#quickfix#getEditableDataNames()
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#quickfix#renewCache()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#quickfix#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#quickfix#onInit()
|
||||||
|
call fuf#defineLaunchCommand('FufQuickfix', s:MODE_NAME, '""', [])
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:getJumpsLines()
|
||||||
|
redir => result
|
||||||
|
:silent jumps
|
||||||
|
redir END
|
||||||
|
return split(result, "\n")
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:parseJumpsLine(line)
|
||||||
|
return matchlist(a:line, '^\(.\)\s\+\(\d\+\)\s\(.*\)$')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:makeItem(qfItem)
|
||||||
|
if !a:qfItem.valid
|
||||||
|
return {}
|
||||||
|
endif
|
||||||
|
let item = fuf#makeNonPathItem(
|
||||||
|
\ printf('%s|%d:%d|%s', bufname(a:qfItem.bufnr), a:qfItem.lnum,
|
||||||
|
\ a:qfItem.col, matchstr(a:qfItem.text, '\s*\zs.*\S'))
|
||||||
|
\ , '')
|
||||||
|
let item.bufnr = a:qfItem.bufnr
|
||||||
|
let item.lnum = a:qfItem.lnum
|
||||||
|
return item
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(g:fuf_quickfix_prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
let items = filter(copy(self.items), 'v:val.word ==# a:word')
|
||||||
|
if empty(items)
|
||||||
|
return []
|
||||||
|
endif
|
||||||
|
let lines = fuf#getFileLines(items[0].bufnr)
|
||||||
|
return fuf#makePreviewLinesAround(
|
||||||
|
\ lines, [items[0].lnum - 1], a:count, self.getPreviewHeight())
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return self.items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
call fuf#prejump(a:mode)
|
||||||
|
call filter(self.items, 'v:val.word ==# a:word')
|
||||||
|
if !empty(self.items)
|
||||||
|
execute 'cc ' . self.items[0].index
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
let self.items = getqflist()
|
||||||
|
call map(self.items, 's:makeItem(v:val)')
|
||||||
|
call fuf#mapToSetSerialIndex(self.items, 1)
|
||||||
|
call filter(self.items, 'exists("v:val.word")')
|
||||||
|
call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
||||||
|
|
|
@ -0,0 +1,178 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#tag#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#tag#getSwitchOrder()
|
||||||
|
return g:fuf_tag_switchOrder
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#tag#getEditableDataNames()
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#tag#renewCache()
|
||||||
|
let s:cache = {}
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#tag#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#tag#onInit()
|
||||||
|
call fuf#defineLaunchCommand('FufTag' , s:MODE_NAME, '""', [])
|
||||||
|
call fuf#defineLaunchCommand('FufTagWithCursorWord', s:MODE_NAME, 'expand(''<cword>'')', [])
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:getTagNames(tagFile)
|
||||||
|
let names = map(l9#readFile(a:tagFile), 'matchstr(v:val, ''^[^!\t][^\t]*'')')
|
||||||
|
return filter(names, 'v:val =~# ''\S''')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:parseTagFiles(tagFiles, key)
|
||||||
|
let cacheName = 'cache-' . l9#hash224(a:key)
|
||||||
|
let cacheTime = fuf#getDataFileTime(s:MODE_NAME, cacheName)
|
||||||
|
if cacheTime != -1 && fuf#countModifiedFiles(a:tagFiles, cacheTime) == 0
|
||||||
|
return fuf#loadDataFile(s:MODE_NAME, cacheName)
|
||||||
|
endif
|
||||||
|
let items = l9#unique(l9#concat(map(copy(a:tagFiles), 's:getTagNames(v:val)')))
|
||||||
|
let items = map(items, 'fuf#makeNonPathItem(v:val, "")')
|
||||||
|
call fuf#mapToSetSerialIndex(items, 1)
|
||||||
|
let items = map(items, 'fuf#setAbbrWithFormattedWord(v:val, 1)')
|
||||||
|
call fuf#saveDataFile(s:MODE_NAME, cacheName, items)
|
||||||
|
return items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:enumTags(tagFiles)
|
||||||
|
if !len(a:tagFiles)
|
||||||
|
return []
|
||||||
|
endif
|
||||||
|
let key = join([g:fuf_ignoreCase] + a:tagFiles, "\n")
|
||||||
|
if !exists('s:cache[key]') || fuf#countModifiedFiles(a:tagFiles, s:cache[key].time)
|
||||||
|
let s:cache[key] = {
|
||||||
|
\ 'time' : localtime(),
|
||||||
|
\ 'items' : s:parseTagFiles(a:tagFiles, key)
|
||||||
|
\ }
|
||||||
|
endif
|
||||||
|
return s:cache[key].items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:getMatchingIndex(lines, cmd)
|
||||||
|
if a:cmd !~# '\D'
|
||||||
|
return str2nr(a:cmd)
|
||||||
|
endif
|
||||||
|
let pattern = matchstr(a:cmd, '^\/\^\zs.*\ze\$\/$')
|
||||||
|
if empty(pattern)
|
||||||
|
return -1
|
||||||
|
endif
|
||||||
|
for i in range(len(a:lines))
|
||||||
|
if a:lines[i] ==# pattern
|
||||||
|
return i
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
return -1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(g:fuf_tag_prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" 'cmd' is '/^hoge hoge$/' or line number
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
let tags = taglist('^' . a:word . '$')
|
||||||
|
if empty(tags)
|
||||||
|
return []
|
||||||
|
endif
|
||||||
|
let i = a:count % len(tags)
|
||||||
|
let title = printf('(%d/%d) %s', i + 1, len(tags), tags[i].filename)
|
||||||
|
let lines = fuf#getFileLines(tags[i].filename)
|
||||||
|
let index = s:getMatchingIndex(lines, tags[i].cmd)
|
||||||
|
return [title] + fuf#makePreviewLinesAround(
|
||||||
|
\ lines, (index < 0 ? [] : [index]), 0, self.getPreviewHeight() - 1)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return s:enumTags(self.tagFiles)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
call fuf#openTag(a:word, a:mode)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
let self.tagFiles = fuf#getCurrentTagFiles()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
let &l:tags = join(self.tagFiles, ',')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
let &l:tags = ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,159 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 0, 0, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" GLOBAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#taggedfile#createHandler(base)
|
||||||
|
return a:base.concretize(copy(s:handler))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#taggedfile#getSwitchOrder()
|
||||||
|
return g:fuf_taggedfile_switchOrder
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#taggedfile#getEditableDataNames()
|
||||||
|
return []
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#taggedfile#renewCache()
|
||||||
|
let s:cache = {}
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#taggedfile#requiresOnCommandPre()
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function fuf#taggedfile#onInit()
|
||||||
|
call fuf#defineLaunchCommand('FufTaggedFile', s:MODE_NAME, '""', [])
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS/VARIABLES {{{1
|
||||||
|
|
||||||
|
let s:MODE_NAME = expand('<sfile>:t:r')
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:getTaggedFileList(tagfile)
|
||||||
|
execute 'cd ' . fnamemodify(a:tagfile, ':h')
|
||||||
|
let result = map(l9#readFile(a:tagfile), 'matchstr(v:val, ''^[^!\t][^\t]*\t\zs[^\t]\+'')')
|
||||||
|
call map(l9#readFile(a:tagfile), 'fnamemodify(v:val, ":p")')
|
||||||
|
cd -
|
||||||
|
call map(l9#readFile(a:tagfile), 'fnamemodify(v:val, ":~:.")')
|
||||||
|
return filter(result, 'v:val =~# ''[^/\\ ]$''')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:parseTagFiles(tagFiles, key)
|
||||||
|
let cacheName = 'cache-' . l9#hash224(a:key)
|
||||||
|
let cacheTime = fuf#getDataFileTime(s:MODE_NAME, cacheName)
|
||||||
|
if cacheTime != -1 && fuf#countModifiedFiles(a:tagFiles, cacheTime) == 0
|
||||||
|
return fuf#loadDataFile(s:MODE_NAME, cacheName)
|
||||||
|
endif
|
||||||
|
let items = l9#unique(l9#concat(map(copy(a:tagFiles), 's:getTaggedFileList(v:val)')))
|
||||||
|
call map(items, 'fuf#makePathItem(v:val, "", 0)')
|
||||||
|
call fuf#mapToSetSerialIndex(items, 1)
|
||||||
|
call fuf#mapToSetAbbrWithSnippedWordAsPath(items)
|
||||||
|
call fuf#saveDataFile(s:MODE_NAME, cacheName, items)
|
||||||
|
return items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:enumTaggedFiles(tagFiles)
|
||||||
|
if !len(a:tagFiles)
|
||||||
|
return []
|
||||||
|
endif
|
||||||
|
let key = join([getcwd(), g:fuf_ignoreCase] + a:tagFiles, "\n")
|
||||||
|
if !exists('s:cache[key]') || fuf#countModifiedFiles(a:tagFiles, s:cache[key].time)
|
||||||
|
let s:cache[key] = {
|
||||||
|
\ 'time' : localtime(),
|
||||||
|
\ 'items' : s:parseTagFiles(a:tagFiles, key)
|
||||||
|
\ }
|
||||||
|
endif
|
||||||
|
return s:cache[key].items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" s:handler {{{1
|
||||||
|
|
||||||
|
let s:handler = {}
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getModeName()
|
||||||
|
return s:MODE_NAME
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPrompt()
|
||||||
|
return fuf#formatPrompt(g:fuf_taggedfile_prompt, self.partialMatching, '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getPreviewHeight()
|
||||||
|
return g:fuf_previewHeight
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.isOpenable(enteredPattern)
|
||||||
|
return 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePatternSet(patternBase)
|
||||||
|
return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath',
|
||||||
|
\ self.partialMatching)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.makePreviewLines(word, count)
|
||||||
|
return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight())
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.getCompleteItems(patternPrimary)
|
||||||
|
return self.items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onOpen(word, mode)
|
||||||
|
call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPre()
|
||||||
|
let self.tagFiles = fuf#getCurrentTagFiles()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeEnterPost()
|
||||||
|
" NOTE: Comparing filenames is faster than bufnr('^' . fname . '$')
|
||||||
|
let bufNamePrev = fnamemodify(bufname(self.bufNrPrev), ':p:~:.')
|
||||||
|
" NOTE: Don't do this in onModeEnterPre()
|
||||||
|
" because that should return in a short time.
|
||||||
|
let self.items = copy(s:enumTaggedFiles(self.tagFiles))
|
||||||
|
call filter(self.items, 'v:val.word !=# bufNamePrev')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:handler.onModeLeavePost(opened)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
|
@ -0,0 +1,326 @@
|
||||||
|
" pathogen.vim - path option manipulation
|
||||||
|
" Maintainer: Tim Pope <http://tpo.pe/>
|
||||||
|
" Version: 2.2
|
||||||
|
|
||||||
|
" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
|
||||||
|
"
|
||||||
|
" For management of individually installed plugins in ~/.vim/bundle (or
|
||||||
|
" ~\vimfiles\bundle), adding `call pathogen#infect()` to the top of your
|
||||||
|
" .vimrc is the only other setup necessary.
|
||||||
|
"
|
||||||
|
" The API is documented inline below. For maximum ease of reading,
|
||||||
|
" :set foldmethod=marker
|
||||||
|
|
||||||
|
if exists("g:loaded_pathogen") || &cp
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let g:loaded_pathogen = 1
|
||||||
|
|
||||||
|
function! s:warn(msg)
|
||||||
|
echohl WarningMsg
|
||||||
|
echomsg a:msg
|
||||||
|
echohl NONE
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Point of entry for basic default usage. Give a relative path to invoke
|
||||||
|
" pathogen#incubate() (defaults to "bundle/{}"), or an absolute path to invoke
|
||||||
|
" pathogen#surround(). For backwards compatibility purposes, a full path that
|
||||||
|
" does not end in {} or * is given to pathogen#runtime_prepend_subdirectories()
|
||||||
|
" instead.
|
||||||
|
function! pathogen#infect(...) abort " {{{1
|
||||||
|
for path in a:0 ? reverse(copy(a:000)) : ['bundle/{}']
|
||||||
|
if path =~# '^[^\\/]\+$'
|
||||||
|
call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
|
||||||
|
call pathogen#incubate(path . '/{}')
|
||||||
|
elseif path =~# '^[^\\/]\+[\\/]\%({}\|\*\)$'
|
||||||
|
call pathogen#incubate(path)
|
||||||
|
elseif path =~# '[\\/]\%({}\|\*\)$'
|
||||||
|
call pathogen#surround(path)
|
||||||
|
else
|
||||||
|
call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
|
||||||
|
call pathogen#surround(path . '/{}')
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
call pathogen#cycle_filetype()
|
||||||
|
return ''
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
" Split a path into a list.
|
||||||
|
function! pathogen#split(path) abort " {{{1
|
||||||
|
if type(a:path) == type([]) | return a:path | endif
|
||||||
|
let split = split(a:path,'\\\@<!\%(\\\\\)*\zs,')
|
||||||
|
return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")')
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
" Convert a list to a path.
|
||||||
|
function! pathogen#join(...) abort " {{{1
|
||||||
|
if type(a:1) == type(1) && a:1
|
||||||
|
let i = 1
|
||||||
|
let space = ' '
|
||||||
|
else
|
||||||
|
let i = 0
|
||||||
|
let space = ''
|
||||||
|
endif
|
||||||
|
let path = ""
|
||||||
|
while i < a:0
|
||||||
|
if type(a:000[i]) == type([])
|
||||||
|
let list = a:000[i]
|
||||||
|
let j = 0
|
||||||
|
while j < len(list)
|
||||||
|
let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g')
|
||||||
|
let path .= ',' . escaped
|
||||||
|
let j += 1
|
||||||
|
endwhile
|
||||||
|
else
|
||||||
|
let path .= "," . a:000[i]
|
||||||
|
endif
|
||||||
|
let i += 1
|
||||||
|
endwhile
|
||||||
|
return substitute(path,'^,','','')
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
" Convert a list to a path with escaped spaces for 'path', 'tag', etc.
|
||||||
|
function! pathogen#legacyjoin(...) abort " {{{1
|
||||||
|
return call('pathogen#join',[1] + a:000)
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
" Remove duplicates from a list.
|
||||||
|
function! pathogen#uniq(list) abort " {{{1
|
||||||
|
let i = 0
|
||||||
|
let seen = {}
|
||||||
|
while i < len(a:list)
|
||||||
|
if (a:list[i] ==# '' && exists('empty')) || has_key(seen,a:list[i])
|
||||||
|
call remove(a:list,i)
|
||||||
|
elseif a:list[i] ==# ''
|
||||||
|
let i += 1
|
||||||
|
let empty = 1
|
||||||
|
else
|
||||||
|
let seen[a:list[i]] = 1
|
||||||
|
let i += 1
|
||||||
|
endif
|
||||||
|
endwhile
|
||||||
|
return a:list
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
" \ on Windows unless shellslash is set, / everywhere else.
|
||||||
|
function! pathogen#separator() abort " {{{1
|
||||||
|
return !exists("+shellslash") || &shellslash ? '/' : '\'
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
" Convenience wrapper around glob() which returns a list.
|
||||||
|
function! pathogen#glob(pattern) abort " {{{1
|
||||||
|
let files = split(glob(a:pattern),"\n")
|
||||||
|
return map(files,'substitute(v:val,"[".pathogen#separator()."/]$","","")')
|
||||||
|
endfunction "}}}1
|
||||||
|
|
||||||
|
" Like pathogen#glob(), only limit the results to directories.
|
||||||
|
function! pathogen#glob_directories(pattern) abort " {{{1
|
||||||
|
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
|
||||||
|
endfunction "}}}1
|
||||||
|
|
||||||
|
" Turn filetype detection off and back on again if it was already enabled.
|
||||||
|
function! pathogen#cycle_filetype() " {{{1
|
||||||
|
if exists('g:did_load_filetypes')
|
||||||
|
filetype off
|
||||||
|
filetype on
|
||||||
|
endif
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
" Check if a bundle is disabled. A bundle is considered disabled if it ends
|
||||||
|
" in a tilde or its basename or full name is included in the list
|
||||||
|
" g:pathogen_disabled.
|
||||||
|
function! pathogen#is_disabled(path) " {{{1
|
||||||
|
if a:path =~# '\~$'
|
||||||
|
return 1
|
||||||
|
elseif !exists("g:pathogen_disabled")
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
let sep = pathogen#separator()
|
||||||
|
let blacklist = g:pathogen_disabled
|
||||||
|
return index(blacklist, strpart(a:path, strridx(a:path, sep)+1)) != -1 && index(blacklist, a:path) != 1
|
||||||
|
endfunction "}}}1
|
||||||
|
|
||||||
|
" Prepend the given directory to the runtime path and append its corresponding
|
||||||
|
" after directory. If the directory is already included, move it to the
|
||||||
|
" outermost position. Wildcards are added as is. Ending a path in /{} causes
|
||||||
|
" all subdirectories to be added (except those in g:pathogen_disabled).
|
||||||
|
function! pathogen#surround(path) abort " {{{1
|
||||||
|
let sep = pathogen#separator()
|
||||||
|
let rtp = pathogen#split(&rtp)
|
||||||
|
if a:path =~# '[\\/]{}$'
|
||||||
|
let path = fnamemodify(a:path[0:-4], ':p:s?[\\/]\=$??')
|
||||||
|
let before = filter(pathogen#glob_directories(path.sep.'*'), '!pathogen#is_disabled(v:val)')
|
||||||
|
let after = filter(reverse(pathogen#glob_directories(path.sep."*".sep."after")), '!pathogen#is_disabled(v:val[0:-7])')
|
||||||
|
call filter(rtp,'v:val[0:strlen(path)-1] !=# path')
|
||||||
|
else
|
||||||
|
let path = fnamemodify(a:path, ':p:s?[\\/]\=$??')
|
||||||
|
let before = [path]
|
||||||
|
let after = [path . sep . 'after']
|
||||||
|
call filter(rtp, 'index(before + after, v:val) == -1')
|
||||||
|
endif
|
||||||
|
let &rtp = pathogen#join(before, rtp, after)
|
||||||
|
return &rtp
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
" Prepend all subdirectories of path to the rtp, and append all 'after'
|
||||||
|
" directories in those subdirectories. Deprecated.
|
||||||
|
function! pathogen#runtime_prepend_subdirectories(path) " {{{1
|
||||||
|
call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#surround('.string(a:path.'/{}').')')
|
||||||
|
return pathogen#surround(a:path . pathogen#separator() . '{}')
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
" For each directory in the runtime path, add a second entry with the given
|
||||||
|
" argument appended. If the argument ends in '/{}', add a separate entry for
|
||||||
|
" each subdirectory. The default argument is 'bundle/{}', which means that
|
||||||
|
" .vim/bundle/*, $VIM/vimfiles/bundle/*, $VIMRUNTIME/bundle/*,
|
||||||
|
" $VIM/vim/files/bundle/*/after, and .vim/bundle/*/after will be added (on
|
||||||
|
" UNIX).
|
||||||
|
function! pathogen#incubate(...) abort " {{{1
|
||||||
|
let sep = pathogen#separator()
|
||||||
|
let name = a:0 ? a:1 : 'bundle/{}'
|
||||||
|
if "\n".s:done_bundles =~# "\\M\n".name."\n"
|
||||||
|
return ""
|
||||||
|
endif
|
||||||
|
let s:done_bundles .= name . "\n"
|
||||||
|
let list = []
|
||||||
|
for dir in pathogen#split(&rtp)
|
||||||
|
if dir =~# '\<after$'
|
||||||
|
if name =~# '{}$'
|
||||||
|
let list += filter(pathogen#glob_directories(substitute(dir,'after$',name[0:-3],'').'*'.sep.'after'), '!pathogen#is_disabled(v:val[0:-7])') + [dir]
|
||||||
|
else
|
||||||
|
let list += [dir, substitute(dir, 'after$', '', '') . name . sep . 'after']
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if name =~# '{}$'
|
||||||
|
let list += [dir] + filter(pathogen#glob_directories(dir.sep.name[0:-3].'*'), '!pathogen#is_disabled(v:val)')
|
||||||
|
else
|
||||||
|
let list += [dir . sep . name, dir]
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
let &rtp = pathogen#join(pathogen#uniq(list))
|
||||||
|
return 1
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
" Deprecated alias for pathogen#incubate().
|
||||||
|
function! pathogen#runtime_append_all_bundles(...) abort " {{{1
|
||||||
|
if a:0
|
||||||
|
call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#incubate('.string(a:1.'/{}').')')
|
||||||
|
else
|
||||||
|
call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#incubate()')
|
||||||
|
endif
|
||||||
|
return call('pathogen#incubate', map(copy(a:000),'v:val . "/{}"'))
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
let s:done_bundles = ''
|
||||||
|
" }}}1
|
||||||
|
|
||||||
|
" Invoke :helptags on all non-$VIM doc directories in runtimepath.
|
||||||
|
function! pathogen#helptags() abort " {{{1
|
||||||
|
let sep = pathogen#separator()
|
||||||
|
for glob in pathogen#split(&rtp)
|
||||||
|
for dir in split(glob(glob), "\n")
|
||||||
|
if (dir.sep)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir.sep.'doc') == 2 && !empty(filter(split(glob(dir.sep.'doc'.sep.'*'),"\n>"),'!isdirectory(v:val)')) && (!filereadable(dir.sep.'doc'.sep.'tags') || filewritable(dir.sep.'doc'.sep.'tags'))
|
||||||
|
silent! execute 'helptags' pathogen#fnameescape(dir.'/doc')
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endfor
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
command! -bar Helptags :call pathogen#helptags()
|
||||||
|
|
||||||
|
" Execute the given command. This is basically a backdoor for --remote-expr.
|
||||||
|
function! pathogen#execute(...) abort " {{{1
|
||||||
|
for command in a:000
|
||||||
|
execute command
|
||||||
|
endfor
|
||||||
|
return ''
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
" Like findfile(), but hardcoded to use the runtimepath.
|
||||||
|
function! pathogen#runtime_findfile(file,count) abort "{{{1
|
||||||
|
let rtp = pathogen#join(1,pathogen#split(&rtp))
|
||||||
|
let file = findfile(a:file,rtp,a:count)
|
||||||
|
if file ==# ''
|
||||||
|
return ''
|
||||||
|
else
|
||||||
|
return fnamemodify(file,':p')
|
||||||
|
endif
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
" Backport of fnameescape().
|
||||||
|
function! pathogen#fnameescape(string) abort " {{{1
|
||||||
|
if exists('*fnameescape')
|
||||||
|
return fnameescape(a:string)
|
||||||
|
elseif a:string ==# '-'
|
||||||
|
return '\-'
|
||||||
|
else
|
||||||
|
return substitute(escape(a:string," \t\n*?[{`$\\%#'\"|!<"),'^[+>]','\\&','')
|
||||||
|
endif
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
if exists(':Vedit')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:vopen_warning = 0
|
||||||
|
|
||||||
|
function! s:find(count,cmd,file,lcd) " {{{1
|
||||||
|
let rtp = pathogen#join(1,pathogen#split(&runtimepath))
|
||||||
|
let file = pathogen#runtime_findfile(a:file,a:count)
|
||||||
|
if file ==# ''
|
||||||
|
return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'"
|
||||||
|
endif
|
||||||
|
if !s:vopen_warning
|
||||||
|
let s:vopen_warning = 1
|
||||||
|
let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE'
|
||||||
|
else
|
||||||
|
let warning = ''
|
||||||
|
endif
|
||||||
|
if a:lcd
|
||||||
|
let path = file[0:-strlen(a:file)-2]
|
||||||
|
execute 'lcd `=path`'
|
||||||
|
return a:cmd.' '.pathogen#fnameescape(a:file) . warning
|
||||||
|
else
|
||||||
|
return a:cmd.' '.pathogen#fnameescape(file) . warning
|
||||||
|
endif
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
function! s:Findcomplete(A,L,P) " {{{1
|
||||||
|
let sep = pathogen#separator()
|
||||||
|
let cheats = {
|
||||||
|
\'a': 'autoload',
|
||||||
|
\'d': 'doc',
|
||||||
|
\'f': 'ftplugin',
|
||||||
|
\'i': 'indent',
|
||||||
|
\'p': 'plugin',
|
||||||
|
\'s': 'syntax'}
|
||||||
|
if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0])
|
||||||
|
let request = cheats[a:A[0]].a:A[1:-1]
|
||||||
|
else
|
||||||
|
let request = a:A
|
||||||
|
endif
|
||||||
|
let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*'
|
||||||
|
let found = {}
|
||||||
|
for path in pathogen#split(&runtimepath)
|
||||||
|
let path = expand(path, ':p')
|
||||||
|
let matches = split(glob(path.sep.pattern),"\n")
|
||||||
|
call map(matches,'isdirectory(v:val) ? v:val.sep : v:val')
|
||||||
|
call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]')
|
||||||
|
for match in matches
|
||||||
|
let found[match] = 1
|
||||||
|
endfor
|
||||||
|
endfor
|
||||||
|
return sort(keys(found))
|
||||||
|
endfunction " }}}1
|
||||||
|
|
||||||
|
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(<count>,'edit<bang>',<q-args>,0)
|
||||||
|
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(<count>,'edit<bang>',<q-args>,0)
|
||||||
|
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(<count>,'edit<bang>',<q-args>,1)
|
||||||
|
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(<count>,'split',<q-args>,<bang>1)
|
||||||
|
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(<count>,'vsplit',<q-args>,<bang>1)
|
||||||
|
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(<count>,'tabedit',<q-args>,<bang>1)
|
||||||
|
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(<count>,'pedit',<q-args>,<bang>1)
|
||||||
|
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(<count>,'read',<q-args>,<bang>1)
|
||||||
|
|
||||||
|
" vim:set et sw=2:
|
|
@ -0,0 +1,27 @@
|
||||||
|
" Vim color file
|
||||||
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
|
" Last Change: 2001 Jul 23
|
||||||
|
|
||||||
|
" This is the default color scheme. It doesn't define the Normal
|
||||||
|
" highlighting, it uses whatever the colors used to be.
|
||||||
|
|
||||||
|
" Set 'background' back to the default. The value can't always be estimated
|
||||||
|
" and is then guessed.
|
||||||
|
hi clear Normal
|
||||||
|
set bg&
|
||||||
|
|
||||||
|
" Remove all existing highlighting and set the defaults.
|
||||||
|
hi clear
|
||||||
|
|
||||||
|
" Load the syntax highlighting defaults, if it's enabled.
|
||||||
|
if exists("syntax_on")
|
||||||
|
syntax reset
|
||||||
|
endif
|
||||||
|
|
||||||
|
let colors_name = "default"
|
||||||
|
|
||||||
|
hi Comment term=bold ctermfg=darkcyan guifg=Red
|
||||||
|
hi Folded ctermfg=darkgrey ctermbg=NONE
|
||||||
|
hi FoldColumn ctermfg=darkgrey ctermbg=NONE
|
||||||
|
|
||||||
|
" vim: sw=2
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,257 @@
|
||||||
|
*fugitive.txt* A Git wrapper so awesome, it should be illegal
|
||||||
|
|
||||||
|
Author: Tim Pope <vimNOSPAM@tpope.org> *fugitive-author*
|
||||||
|
License: Same terms as Vim itself (see |license|)
|
||||||
|
|
||||||
|
This plugin is only available if 'compatible' is not set.
|
||||||
|
|
||||||
|
INTRODUCTION *fugitive*
|
||||||
|
|
||||||
|
Install in ~/.vim, or in ~\vimfiles if you're on Windows and feeling lucky.
|
||||||
|
Vim 7.2 is recommended as it ships with syntax highlighting for many Git file
|
||||||
|
types.
|
||||||
|
|
||||||
|
If you're in a hurry to get started, here are some things to try:
|
||||||
|
|
||||||
|
In any file in your repository, run |:Gedit| HEAD. Press <CR> to jump to the
|
||||||
|
current branch. Press <CR> again to jump to the top most commit. Keep using
|
||||||
|
<CR> to explore parent commits, trees, and blobs. Use C in a tree or blob to
|
||||||
|
get back to the commit.
|
||||||
|
|
||||||
|
Edit a file in the work tree and make some changes. Use |:Gdiff| to open up
|
||||||
|
the indexed version. Use |do| and |dp| on various hunks to bring the files in
|
||||||
|
sync, or use |:Gread| to pull in all changes. Write the indexed version to
|
||||||
|
stage the file.
|
||||||
|
|
||||||
|
Run |:Gstatus| to check your repository's status. Use "-" to stage and reset
|
||||||
|
files and "p" to add/reset --patch them. Invoke |:Gcommit| to commit your
|
||||||
|
changes.
|
||||||
|
|
||||||
|
Run |:Gblame| in a work tree file to see a blame in a vertical split. Press
|
||||||
|
<CR> on any line to reopen and reblame that file as it stood in that commit.
|
||||||
|
Press o or O on any line to inspect that commit in a split or a tab.
|
||||||
|
|
||||||
|
Run |:Ggrep| to search the work tree or history. Run |:Gmove| to rename a
|
||||||
|
file. Run |:Gremove| to delete a file.
|
||||||
|
|
||||||
|
COMMANDS *fugitive-commands*
|
||||||
|
|
||||||
|
These commands are local to the buffers in which they work (generally, buffers
|
||||||
|
that are part of Git repositories).
|
||||||
|
|
||||||
|
*fugitive-:Git*
|
||||||
|
:Git [args] Run an arbitrary git command. Similar to :!git [args]
|
||||||
|
but chdir to the repository tree first.
|
||||||
|
|
||||||
|
*fugitive-:Gcd*
|
||||||
|
:Gcd [directory] |:cd| relative to the repository.
|
||||||
|
|
||||||
|
*fugitive-:Glcd*
|
||||||
|
:Glcd [directory] |:lcd| relative to the repository.
|
||||||
|
|
||||||
|
*fugitive-:Gstatus*
|
||||||
|
:Gstatus Bring up the output of git-status in the preview
|
||||||
|
window. In addition to standard motions, you can
|
||||||
|
use <C-N> and <C-P> to jump from filename to
|
||||||
|
filename. Press C to invoke |:Gcommit|. Press D to
|
||||||
|
|:Gdiff| the file on the cursor line, or ds to
|
||||||
|
|:Gsdiff|. Press - to stage or unstage the file on
|
||||||
|
the cursor line. Press p to do so on a per hunk basis
|
||||||
|
(--patch). All of D, -, and p have a different,
|
||||||
|
sensible (and hopefully intuitive) behavior when
|
||||||
|
invoked on a heading rather than a file name.
|
||||||
|
|
||||||
|
*fugitive-:Gcommit*
|
||||||
|
:Gcommit [args] A wrapper around git-commit. If there is nothing
|
||||||
|
to commit, |:Gstatus| is called instead. Unless the
|
||||||
|
arguments given would skip the invocation of an editor
|
||||||
|
(e.g., -m), a split window will be used to obtain a
|
||||||
|
commit message. Write and close that window (:wq or
|
||||||
|
|:Gwrite|) to finish the commit. Unlike when running
|
||||||
|
the actual git-commit command, it is possible (but
|
||||||
|
unadvisable) to muck with the index with commands like
|
||||||
|
git-add and git-reset while a commit message is
|
||||||
|
pending.
|
||||||
|
|
||||||
|
*fugitive-:Ggrep*
|
||||||
|
:Ggrep [args] |:grep| with git-grep as 'grepprg'.
|
||||||
|
|
||||||
|
*fugitive-:Glog*
|
||||||
|
:Glog [args] Load all previous revisions of the current file into
|
||||||
|
the quickfix list. Additional git-log arguments can
|
||||||
|
be given (for example, --reverse). If "--" appears as
|
||||||
|
an argument, no file specific filtering is done, and
|
||||||
|
commits are loaded into the quickfix list.
|
||||||
|
|
||||||
|
*fugitive-:Gedit* *fugitive-:Ge*
|
||||||
|
:Gedit [revision] |:edit| a |fugitive-revision|.
|
||||||
|
|
||||||
|
*fugitive-:Gsplit*
|
||||||
|
:Gsplit [revision] |:split| a |fugitive-revision|.
|
||||||
|
|
||||||
|
*fugitive-:Gvsplit*
|
||||||
|
:Gvsplit [revision] |:vsplit| a |fugitive-revision|.
|
||||||
|
|
||||||
|
*fugitive-:Gtabedit*
|
||||||
|
:Gtabedit [revision] |:tabedit| a |fugitive-revision|
|
||||||
|
|
||||||
|
*fugitive-:Gpedit*
|
||||||
|
:Gpedit [revision] |:pedit| a |fugitive-revision|
|
||||||
|
|
||||||
|
*fugitive-:Gread*
|
||||||
|
:Gread [revision] Empty the buffer and |:read| a |fugitive-revision|.
|
||||||
|
When the argument is omitted, this is similar to
|
||||||
|
git-checkout on a work tree file or git-add on a stage
|
||||||
|
file, but without writing anything to disk.
|
||||||
|
|
||||||
|
:{range}Gread [revision]
|
||||||
|
|:read| in a |fugitive-revision| after {range}.
|
||||||
|
|
||||||
|
*fugitive-:Gwrite*
|
||||||
|
:Gwrite Write to the current file's path and stage the results.
|
||||||
|
When run in a work tree file, it is effectively git
|
||||||
|
add. Elsewhere, it is effectively git-checkout. A
|
||||||
|
great deal of effort is expended to behave sensibly
|
||||||
|
when the work tree or index version of the file is
|
||||||
|
open in another buffer.
|
||||||
|
|
||||||
|
:Gwrite {path} You can give |:Gwrite| an explicit path of where in
|
||||||
|
the work tree to write. You can also give a path like
|
||||||
|
:0:foo.txt or even :0 to write to just that stage in
|
||||||
|
the index.
|
||||||
|
|
||||||
|
*fugitive-:Gwq*
|
||||||
|
:Gwq [path] Like |:Gwrite| followed by |:quit| if the write
|
||||||
|
succeeded.
|
||||||
|
|
||||||
|
:Gwq! [path] Like |:Gwrite|! followed by |:quit|! if the write
|
||||||
|
succeeded.
|
||||||
|
|
||||||
|
*fugitive-:Gdiff*
|
||||||
|
:Gdiff [revision] Perform a |vimdiff| against the current file in the
|
||||||
|
given revision. With no argument, the version in the
|
||||||
|
index is used (which means a three-way diff during a
|
||||||
|
merge conflict, making it a git-mergetool
|
||||||
|
alternative). The newer of the two files is placed
|
||||||
|
to the right. Use |do| and |dp| and write to the
|
||||||
|
index file to simulate "git add --patch".
|
||||||
|
|
||||||
|
*fugitive-:Gsdiff*
|
||||||
|
:Gsdiff [revision] Like |:Gdiff|, but split horizontally.
|
||||||
|
|
||||||
|
*fugitive-:Gvdiff*
|
||||||
|
:Gvdiff [revision] Identical to |:Gdiff|. For symmetry with |:Gsdiff|.
|
||||||
|
|
||||||
|
*fugitive-:Gmove*
|
||||||
|
:Gmove {destination} Wrapper around git-mv that renames the buffer
|
||||||
|
afterward. The destination is relative to the current
|
||||||
|
directory except when started with a /, in which case
|
||||||
|
it is relative to the work tree. Add a ! to pass -f.
|
||||||
|
|
||||||
|
*fugitive-:Gremove*
|
||||||
|
:Gremove Wrapper around git-rm that deletes the buffer
|
||||||
|
afterward. When invoked in an index file, --cached is
|
||||||
|
passed. Add a ! to pass -f and forcefully discard the
|
||||||
|
buffer.
|
||||||
|
|
||||||
|
*fugitive-:Gblame*
|
||||||
|
:Gblame [flags] Run git-blame on the file and open the results in a
|
||||||
|
scroll bound vertical split. Press enter on a line to
|
||||||
|
reblame the file as it was in that commit. You can
|
||||||
|
give any of ltwfsMC as flags and they will be passed
|
||||||
|
along to git-blame.
|
||||||
|
|
||||||
|
:[range]Gblame [flags] Run git-blame on the given range.
|
||||||
|
|
||||||
|
*fugitive-:Gbrowse*
|
||||||
|
:[range]Gbrowse If the remote for the current branch is on GitHub,
|
||||||
|
open the current file, blob, tree, commit, or tag
|
||||||
|
(with git-web--browse) on GitHub. Otherwise, open the
|
||||||
|
current file, blob, tree, commit, or tag in
|
||||||
|
git-instaweb (if you have issues, verify you can run
|
||||||
|
"git instaweb" from a terminal). If a range is given,
|
||||||
|
it is appropriately appended to the URL as an anchor.
|
||||||
|
|
||||||
|
:[range]Gbrowse! Like :Gbrowse, but put the URL on the clipboard rather
|
||||||
|
than opening it.
|
||||||
|
|
||||||
|
:[range]Gbrowse {revision}
|
||||||
|
Like :Gbrowse, but for a given |fugitive-revision|. A
|
||||||
|
useful value here is -, which ties the URL to the
|
||||||
|
latest commit rather than a volatile branch.
|
||||||
|
|
||||||
|
:[range]Gbrowse [...]@{remote}
|
||||||
|
Force using the given remote rather than the remote
|
||||||
|
for the current branch. The remote is used to
|
||||||
|
determine which GitHub repository to link to.
|
||||||
|
|
||||||
|
MAPPINGS *fugitive-mappings*
|
||||||
|
|
||||||
|
These maps are available in Git objects.
|
||||||
|
|
||||||
|
*fugitive-<CR>*
|
||||||
|
<CR> Jump to the revision under the cursor.
|
||||||
|
|
||||||
|
*fugitive-o*
|
||||||
|
o Jump to the revision under the cursor in a new split.
|
||||||
|
|
||||||
|
*fugitive-O*
|
||||||
|
O Jump to the revision under the cursor in a new tab.
|
||||||
|
|
||||||
|
*fugitive-~*
|
||||||
|
~ Go to the current file in the [count]th first
|
||||||
|
ancestor.
|
||||||
|
|
||||||
|
*fugitive-P*
|
||||||
|
P Go to the current file in the [count]th parent.
|
||||||
|
|
||||||
|
*fugitive-C*
|
||||||
|
C Go to the commit containing the current file.
|
||||||
|
|
||||||
|
*fugitive-a*
|
||||||
|
a Show the current tag, commit, or tree in an alternate
|
||||||
|
format.
|
||||||
|
|
||||||
|
SPECIFYING REVISIONS *fugitive-revision*
|
||||||
|
|
||||||
|
Fugitive revisions are similar to Git revisions as defined in the "SPECIFYING
|
||||||
|
REVISIONS" section in the git-rev-parse man page. For commands that accept an
|
||||||
|
optional revision, the default is the file in the index for work tree files
|
||||||
|
and the work tree file for everything else. Example revisions follow.
|
||||||
|
|
||||||
|
Revision Meaning ~
|
||||||
|
HEAD .git/HEAD
|
||||||
|
master .git/refs/heads/master
|
||||||
|
HEAD^{} The commit referenced by HEAD
|
||||||
|
HEAD^ The parent of the commit referenced by HEAD
|
||||||
|
HEAD: The tree referenced by HEAD
|
||||||
|
/HEAD The file named HEAD in the work tree
|
||||||
|
Makefile The file named Makefile in the work tree
|
||||||
|
HEAD^:Makefile The file named Makefile in the parent of HEAD
|
||||||
|
:Makefile The file named Makefile in the index (writable)
|
||||||
|
- The current file in HEAD
|
||||||
|
^ The current file in the previous commit
|
||||||
|
~3 The current file 3 commits ago
|
||||||
|
: .git/index (Same as |:Gstatus|)
|
||||||
|
:0 The current file in the index
|
||||||
|
:1 The current file's common ancestor during a conflict
|
||||||
|
:2 The current file in the target branch during a conflict
|
||||||
|
:3 The current file in the merged branch during a conflict
|
||||||
|
:/foo The most recent commit with "foo" in the message
|
||||||
|
|
||||||
|
STATUSLINE *fugitive-statusline*
|
||||||
|
|
||||||
|
*fugitive#statusline()*
|
||||||
|
Add %{fugitive#statusline()} to your statusline to get an indicator including
|
||||||
|
the current branch and the currently edited file's commit. If you don't have
|
||||||
|
a statusline, this one matches the default when 'ruler' is set:
|
||||||
|
>
|
||||||
|
set statusline=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P
|
||||||
|
<
|
||||||
|
ABOUT *fugitive-about*
|
||||||
|
|
||||||
|
Grab the latest version or report a bug on GitHub:
|
||||||
|
|
||||||
|
http://github.com/tpope/vim-fugitive
|
||||||
|
|
||||||
|
vim:tw=78:et:ft=help:norl:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,4 @@
|
||||||
|
au BufRead *.vala set efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
|
||||||
|
au BufRead *.vapi set efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
|
||||||
|
au BufRead,BufNewFile *.vala setf vala
|
||||||
|
au BufRead,BufNewFile *.vapi setf vala
|
|
@ -0,0 +1,15 @@
|
||||||
|
" Vim indent file
|
||||||
|
" Language: C
|
||||||
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
|
" Last Change: 2005 Mar 27
|
||||||
|
|
||||||
|
" Only load this indent file when no other was loaded.
|
||||||
|
if exists("b:did_indent")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_indent = 1
|
||||||
|
|
||||||
|
" C indenting is built-in, thus this is very simple
|
||||||
|
setlocal cindent
|
||||||
|
|
||||||
|
let b:undo_indent = "setl cin<"
|
|
@ -0,0 +1,41 @@
|
||||||
|
" ============================================================================
|
||||||
|
" File: exec_menuitem.vim
|
||||||
|
" Description: plugin for NERD Tree that provides an execute file menu item
|
||||||
|
" Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
|
||||||
|
" Last Change: 22 July, 2009
|
||||||
|
" License: This program is free software. It comes without any warranty,
|
||||||
|
" to the extent permitted by applicable law. You can redistribute
|
||||||
|
" it and/or modify it under the terms of the Do What The Fuck You
|
||||||
|
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||||
|
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||||
|
"
|
||||||
|
" ============================================================================
|
||||||
|
if exists("g:loaded_nerdtree_exec_menuitem")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let g:loaded_nerdtree_exec_menuitem = 1
|
||||||
|
|
||||||
|
call NERDTreeAddMenuItem({
|
||||||
|
\ 'text': '(!)Execute file',
|
||||||
|
\ 'shortcut': '!',
|
||||||
|
\ 'callback': 'NERDTreeExecFile',
|
||||||
|
\ 'isActiveCallback': 'NERDTreeExecFileActive' })
|
||||||
|
|
||||||
|
function! NERDTreeExecFileActive()
|
||||||
|
let node = g:NERDTreeFileNode.GetSelected()
|
||||||
|
return !node.path.isDirectory && node.path.isExecutable
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! NERDTreeExecFile()
|
||||||
|
let treenode = g:NERDTreeFileNode.GetSelected()
|
||||||
|
echo "==========================================================\n"
|
||||||
|
echo "Complete the command to execute (add arguments etc):\n"
|
||||||
|
let cmd = treenode.path.str({'escape': 1})
|
||||||
|
let cmd = input(':!', cmd . ' ')
|
||||||
|
|
||||||
|
if cmd != ''
|
||||||
|
exec ':!' . cmd
|
||||||
|
else
|
||||||
|
echo "Aborted"
|
||||||
|
endif
|
||||||
|
endfunction
|
|
@ -0,0 +1,224 @@
|
||||||
|
" ============================================================================
|
||||||
|
" File: fs_menu.vim
|
||||||
|
" Description: plugin for the NERD Tree that provides a file system menu
|
||||||
|
" Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
|
||||||
|
" Last Change: 17 July, 2009
|
||||||
|
" License: This program is free software. It comes without any warranty,
|
||||||
|
" to the extent permitted by applicable law. You can redistribute
|
||||||
|
" it and/or modify it under the terms of the Do What The Fuck You
|
||||||
|
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||||
|
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||||
|
"
|
||||||
|
" ============================================================================
|
||||||
|
if exists("g:loaded_nerdtree_fs_menu")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let g:loaded_nerdtree_fs_menu = 1
|
||||||
|
|
||||||
|
call NERDTreeAddMenuItem({'text': '(a)dd a childnode', 'shortcut': 'a', 'callback': 'NERDTreeAddNode'})
|
||||||
|
call NERDTreeAddMenuItem({'text': '(m)ove the current node', 'shortcut': 'm', 'callback': 'NERDTreeMoveNode'})
|
||||||
|
call NERDTreeAddMenuItem({'text': '(d)elete the current node', 'shortcut': 'd', 'callback': 'NERDTreeDeleteNode'})
|
||||||
|
|
||||||
|
if has("gui_mac") || has("gui_macvim")
|
||||||
|
call NERDTreeAddMenuItem({'text': '(r)eveal in Finder the current node', 'shortcut': 'r', 'callback': 'NERDTreeRevealInFinder'})
|
||||||
|
call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFile'})
|
||||||
|
call NERDTreeAddMenuItem({'text': '(q)uicklook the current node', 'shortcut': 'q', 'callback': 'NERDTreeQuickLook'})
|
||||||
|
endif
|
||||||
|
|
||||||
|
if g:NERDTreePath.CopyingSupported()
|
||||||
|
call NERDTreeAddMenuItem({'text': '(c)copy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'})
|
||||||
|
endif
|
||||||
|
|
||||||
|
"FUNCTION: s:echo(msg){{{1
|
||||||
|
function! s:echo(msg)
|
||||||
|
redraw
|
||||||
|
echomsg "NERDTree: " . a:msg
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"FUNCTION: s:echoWarning(msg){{{1
|
||||||
|
function! s:echoWarning(msg)
|
||||||
|
echohl warningmsg
|
||||||
|
call s:echo(a:msg)
|
||||||
|
echohl normal
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"FUNCTION: s:promptToDelBuffer(bufnum, msg){{{1
|
||||||
|
"prints out the given msg and, if the user responds by pushing 'y' then the
|
||||||
|
"buffer with the given bufnum is deleted
|
||||||
|
"
|
||||||
|
"Args:
|
||||||
|
"bufnum: the buffer that may be deleted
|
||||||
|
"msg: a message that will be echoed to the user asking them if they wish to
|
||||||
|
" del the buffer
|
||||||
|
function! s:promptToDelBuffer(bufnum, msg)
|
||||||
|
echo a:msg
|
||||||
|
if nr2char(getchar()) ==# 'y'
|
||||||
|
exec "silent bdelete! " . a:bufnum
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"FUNCTION: NERDTreeAddNode(){{{1
|
||||||
|
function! NERDTreeAddNode()
|
||||||
|
let curDirNode = g:NERDTreeDirNode.GetSelected()
|
||||||
|
|
||||||
|
let newNodeName = input("Add a childnode\n".
|
||||||
|
\ "==========================================================\n".
|
||||||
|
\ "Enter the dir/file name to be created. Dirs end with a '/'\n" .
|
||||||
|
\ "", curDirNode.path.str() . g:NERDTreePath.Slash(), "file")
|
||||||
|
|
||||||
|
if newNodeName ==# ''
|
||||||
|
call s:echo("Node Creation Aborted.")
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
try
|
||||||
|
let newPath = g:NERDTreePath.Create(newNodeName)
|
||||||
|
let parentNode = b:NERDTreeRoot.findNode(newPath.getParent())
|
||||||
|
|
||||||
|
let newTreeNode = g:NERDTreeFileNode.New(newPath)
|
||||||
|
if parentNode.isOpen || !empty(parentNode.children)
|
||||||
|
call parentNode.addChild(newTreeNode, 1)
|
||||||
|
call NERDTreeRender()
|
||||||
|
call newTreeNode.putCursorHere(1, 0)
|
||||||
|
endif
|
||||||
|
catch /^NERDTree/
|
||||||
|
call s:echoWarning("Node Not Created.")
|
||||||
|
endtry
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"FUNCTION: NERDTreeMoveNode(){{{1
|
||||||
|
function! NERDTreeMoveNode()
|
||||||
|
let curNode = g:NERDTreeFileNode.GetSelected()
|
||||||
|
let newNodePath = input("Rename the current node\n" .
|
||||||
|
\ "==========================================================\n" .
|
||||||
|
\ "Enter the new path for the node: \n" .
|
||||||
|
\ "", curNode.path.str(), "file")
|
||||||
|
|
||||||
|
if newNodePath ==# ''
|
||||||
|
call s:echo("Node Renaming Aborted.")
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
try
|
||||||
|
let bufnum = bufnr(curNode.path.str())
|
||||||
|
|
||||||
|
call curNode.rename(newNodePath)
|
||||||
|
call NERDTreeRender()
|
||||||
|
|
||||||
|
"if the node is open in a buffer, ask the user if they want to
|
||||||
|
"close that buffer
|
||||||
|
if bufnum != -1
|
||||||
|
let prompt = "\nNode renamed.\n\nThe old file is open in buffer ". bufnum . (bufwinnr(bufnum) ==# -1 ? " (hidden)" : "") .". Delete this buffer? (yN)"
|
||||||
|
call s:promptToDelBuffer(bufnum, prompt)
|
||||||
|
endif
|
||||||
|
|
||||||
|
call curNode.putCursorHere(1, 0)
|
||||||
|
|
||||||
|
redraw
|
||||||
|
catch /^NERDTree/
|
||||||
|
call s:echoWarning("Node Not Renamed.")
|
||||||
|
endtry
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" FUNCTION: NERDTreeDeleteNode() {{{1
|
||||||
|
function! NERDTreeDeleteNode()
|
||||||
|
let currentNode = g:NERDTreeFileNode.GetSelected()
|
||||||
|
let confirmed = 0
|
||||||
|
|
||||||
|
if currentNode.path.isDirectory
|
||||||
|
let choice =input("Delete the current node\n" .
|
||||||
|
\ "==========================================================\n" .
|
||||||
|
\ "STOP! To delete this entire directory, type 'yes'\n" .
|
||||||
|
\ "" . currentNode.path.str() . ": ")
|
||||||
|
let confirmed = choice ==# 'yes'
|
||||||
|
else
|
||||||
|
echo "Delete the current node\n" .
|
||||||
|
\ "==========================================================\n".
|
||||||
|
\ "Are you sure you wish to delete the node:\n" .
|
||||||
|
\ "" . currentNode.path.str() . " (yN):"
|
||||||
|
let choice = nr2char(getchar())
|
||||||
|
let confirmed = choice ==# 'y'
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
if confirmed
|
||||||
|
try
|
||||||
|
call currentNode.delete()
|
||||||
|
call NERDTreeRender()
|
||||||
|
|
||||||
|
"if the node is open in a buffer, ask the user if they want to
|
||||||
|
"close that buffer
|
||||||
|
let bufnum = bufnr(currentNode.path.str())
|
||||||
|
if buflisted(bufnum)
|
||||||
|
let prompt = "\nNode deleted.\n\nThe file is open in buffer ". bufnum . (bufwinnr(bufnum) ==# -1 ? " (hidden)" : "") .". Delete this buffer? (yN)"
|
||||||
|
call s:promptToDelBuffer(bufnum, prompt)
|
||||||
|
endif
|
||||||
|
|
||||||
|
redraw
|
||||||
|
catch /^NERDTree/
|
||||||
|
call s:echoWarning("Could not remove node")
|
||||||
|
endtry
|
||||||
|
else
|
||||||
|
call s:echo("delete aborted")
|
||||||
|
endif
|
||||||
|
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" FUNCTION: NERDTreeCopyNode() {{{1
|
||||||
|
function! NERDTreeCopyNode()
|
||||||
|
let currentNode = g:NERDTreeFileNode.GetSelected()
|
||||||
|
let newNodePath = input("Copy the current node\n" .
|
||||||
|
\ "==========================================================\n" .
|
||||||
|
\ "Enter the new path to copy the node to: \n" .
|
||||||
|
\ "", currentNode.path.str(), "file")
|
||||||
|
|
||||||
|
if newNodePath != ""
|
||||||
|
"strip trailing slash
|
||||||
|
let newNodePath = substitute(newNodePath, '\/$', '', '')
|
||||||
|
|
||||||
|
let confirmed = 1
|
||||||
|
if currentNode.path.copyingWillOverwrite(newNodePath)
|
||||||
|
call s:echo("Warning: copying may overwrite files! Continue? (yN)")
|
||||||
|
let choice = nr2char(getchar())
|
||||||
|
let confirmed = choice ==# 'y'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if confirmed
|
||||||
|
try
|
||||||
|
let newNode = currentNode.copy(newNodePath)
|
||||||
|
if !empty(newNode)
|
||||||
|
call NERDTreeRender()
|
||||||
|
call newNode.putCursorHere(0, 0)
|
||||||
|
endif
|
||||||
|
catch /^NERDTree/
|
||||||
|
call s:echoWarning("Could not copy node")
|
||||||
|
endtry
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
call s:echo("Copy aborted.")
|
||||||
|
endif
|
||||||
|
redraw
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! NERDTreeQuickLook()
|
||||||
|
let treenode = g:NERDTreeFileNode.GetSelected()
|
||||||
|
if treenode != {}
|
||||||
|
call system("qlmanage -p 2>/dev/null '" . treenode.path.str() . "'")
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! NERDTreeRevealInFinder()
|
||||||
|
let treenode = g:NERDTreeFileNode.GetSelected()
|
||||||
|
if treenode != {}
|
||||||
|
let x = system("open -R '" . treenode.path.str() . "'")
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! NERDTreeExecuteFile()
|
||||||
|
let treenode = g:NERDTreeFileNode.GetSelected()
|
||||||
|
if treenode != {}
|
||||||
|
let x = system("open '" . treenode.path.str() . "'")
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" vim: set sw=4 sts=4 et fdm=marker:
|
|
@ -0,0 +1,698 @@
|
||||||
|
" File: AutoFenc.vim
|
||||||
|
" Brief: Tries to automatically detect file encoding
|
||||||
|
" Author: Petr Zemek, s3rvac AT gmail DOT com
|
||||||
|
" Version: 1.5
|
||||||
|
" Last Change: Sat Mar 17 11:39:56 CET 2012
|
||||||
|
"
|
||||||
|
" License:
|
||||||
|
" Copyright (C) 2009-2012 Petr Zemek
|
||||||
|
" 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 2 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 MERCHANTABILITY
|
||||||
|
" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
" for more details.
|
||||||
|
"
|
||||||
|
" You should have received a copy of the GNU General Public License along
|
||||||
|
" with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
" 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
"
|
||||||
|
" Description:
|
||||||
|
" This script tries to automatically detect and set file encoding when
|
||||||
|
" opening a file in Vim. It does this in several possible ways (according
|
||||||
|
" to the configuration) in this order (when a method fails, it tries
|
||||||
|
" the following one):
|
||||||
|
" (1) detection of BOM (byte-order-mark) at the beginning of the file,
|
||||||
|
" only for some multibyte encodings
|
||||||
|
" (2) HTML way of encoding detection (via <meta> tag), only for HTML based
|
||||||
|
" file types
|
||||||
|
" (3) XML way of encoding detection (via <?xml ... ?> declaration), only
|
||||||
|
" for XML based file types
|
||||||
|
" (4) CSS way of encoding detection (via @charset 'at-rule'), only for
|
||||||
|
" CSS files
|
||||||
|
" (5) checks whether the encoding is specified in a comment (like
|
||||||
|
" '# Encoding: latin2'), for all file types
|
||||||
|
" (6) tries to detect the encoding via specified external program
|
||||||
|
" (the default one is enca), for all file types
|
||||||
|
"
|
||||||
|
" If the autodetection fails, it's up to Vim (and your configuration)
|
||||||
|
" to set the encoding.
|
||||||
|
"
|
||||||
|
" Configuration options for this plugin (you can set them in your $HOME/.vimrc):
|
||||||
|
" - g:autofenc_enable (0 or 1, default 1)
|
||||||
|
" Enables/disables this plugin.
|
||||||
|
" - g:autofenc_emit_messages (0 or 1, default 0)
|
||||||
|
" Emits messages about the detected/used encoding upon opening a file.
|
||||||
|
" - g:autofenc_max_file_size (number >= 0, default 10485760)
|
||||||
|
" If the size of a file is higher than this value (in bytes), then
|
||||||
|
" the autodetection will not be performed.
|
||||||
|
" - g:autofenc_disable_for_files_matching (regular expression, see below)
|
||||||
|
" If the file (with complete path) matches this regular expression,
|
||||||
|
" then the autodetection will not be performed. It is by default set
|
||||||
|
" to disable autodetection for non-local files (e.g. accessed via ftp,
|
||||||
|
" scp etc., because the script can't handle some kind of autodetection
|
||||||
|
" for these files). The regular expression is matched case-sensitively.
|
||||||
|
" - g:autofenc_disable_for_file_types (list of strings, default [])
|
||||||
|
" If the file type matches some of the filetypes specified in this list,
|
||||||
|
" then the autodetection will not be performed. Comparison is done
|
||||||
|
" case-sensitively.
|
||||||
|
" - g:autofenc_autodetect_bom (0 or 1, default 0 if 'ucs-bom' is in
|
||||||
|
" 'fileencodings', 1 otherwise)
|
||||||
|
" Enables/disables detection of encoding by BOM.
|
||||||
|
" - g:autofenc_autodetect_html (0 or 1, default 1)
|
||||||
|
" Enables/disables detection of encoding for HTML based documents.
|
||||||
|
" - g:autofenc_autodetect_html_filetypes (regular expression, see below)
|
||||||
|
" Regular expression for all supported HTML file types.
|
||||||
|
" - g:autofenc_autodetect_xml (0 or 1, default 1)
|
||||||
|
" Enables/disables detection of encoding for XML based documents.
|
||||||
|
" - g:autofenc_autodetect_xml_filetypes (regular expression, see below)
|
||||||
|
" Regular expression for all supported XML file types.
|
||||||
|
" - g:autofenc_autodetect_css (0 or 1, default 1)
|
||||||
|
" Enables/disables detection of encoding for CSS documents.
|
||||||
|
" - g:autofenc_autodetect_css_filetypes (regular expression, see below)
|
||||||
|
" Regular expression for all supported CSS file types.
|
||||||
|
" - g:autofenc_autodetect_comment (0 or 1, default 1)
|
||||||
|
" Enables/disables detection of encoding in comments.
|
||||||
|
" - g:autofenc_autodetect_commentexpr (regular expression, see below)
|
||||||
|
" Pattern for detection of encodings specified in a comment.
|
||||||
|
" - g:autofenc_autodetect_num_of_lines (number >= 0, default 5)
|
||||||
|
" How many lines from the beginning and from the end of the file should
|
||||||
|
" be searched for the possible encoding declaration.
|
||||||
|
" - g:autofenc_autodetect_ext_prog (0 or 1, default 1)
|
||||||
|
" Enables/disables detection of encoding via external program
|
||||||
|
" (see additional settings below).
|
||||||
|
" - g:autofenc_ext_prog_path (string, default 'enca')
|
||||||
|
" Path to the external program. It can be either relative or absolute.
|
||||||
|
" The external program can take any number of arguments, but
|
||||||
|
" the last one must be a path to the file for which the encoding
|
||||||
|
" is to be detected (it will be supplied by this plugin).
|
||||||
|
" Output of the program must be the name of encoding in which the file
|
||||||
|
" is saved (string on a single line).
|
||||||
|
" - g:autofenc_ext_prog_args (string, default '-i -L czech')
|
||||||
|
" Additional program arguments (can be none, i.e. '').
|
||||||
|
" - g:autofenc_ext_prog_unknown_fenc (string, default '???')
|
||||||
|
" If the output of the external program is this string, then it means
|
||||||
|
" that the file encoding was not detected successfully. The string must
|
||||||
|
" be case-sensitive.
|
||||||
|
" - g:autofenc_enc_blacklist (regular expression, default '')
|
||||||
|
" If the detected encoding matches this regular expression, it is
|
||||||
|
" ignored.
|
||||||
|
"
|
||||||
|
" Requirements:
|
||||||
|
" - filetype plugin must be enabled (a line like 'filetype plugin on' must
|
||||||
|
" be in your $HOME/.vimrc [*nix] or %UserProfile%\_vimrc [MS Windows])
|
||||||
|
"
|
||||||
|
" Installation Details:
|
||||||
|
" Put this file into your $HOME/.vim/plugin directory [*nix]
|
||||||
|
" or %UserProfile%\vimfiles\plugin folder [MS Windows].
|
||||||
|
"
|
||||||
|
" Notes:
|
||||||
|
" This script is by all means NOT perfect, but it works for me and suits my
|
||||||
|
" needs very well, so it might be also useful for you. Your feedback,
|
||||||
|
" opinion, suggestions, bug reports, patches, simply anything you have
|
||||||
|
" to say is welcomed!
|
||||||
|
"
|
||||||
|
" There are similar plugins to this one, so if you don't like this one,
|
||||||
|
" you can test these:
|
||||||
|
" - FencView.vim (http://www.vim.org/scripts/script.php?script_id=1708)
|
||||||
|
" Mainly supports detection of encodings for asian languages.
|
||||||
|
" - MultiEnc.vim (http://www.vim.org/scripts/script.php?script_id=1806)
|
||||||
|
" Obsolete, merged with the previous one.
|
||||||
|
" - charset.vim (http://www.vim.org/scripts/script.php?script_id=199)
|
||||||
|
" Not very complete/correct and last update in 2002.
|
||||||
|
" - http://vim.wikia.com/wiki/Detect_encoding_from_the_charset_specified_in_HTML_files
|
||||||
|
" Same basic ideas but only for HTML files.
|
||||||
|
" Let me know if there are others and I'll add them here.
|
||||||
|
"
|
||||||
|
" Changelog:
|
||||||
|
" 1.5 (2012-03-17) Thanks to Ingo Karkat for the updates in this version.
|
||||||
|
" - Supported HTML/XML/CSS file types have been made configurable and added more defaults.
|
||||||
|
" - Do not emit the "unrecognized charset" message when the encoding is known.
|
||||||
|
"
|
||||||
|
" 1.4 (2012-03-11) Thanks to Ingo Karkat for the updates in this version.
|
||||||
|
" - Improved the detection regexp for comments:
|
||||||
|
" - added "fileencoding" and "charset";
|
||||||
|
" - demands that there is a whitespace in front of the keyword, so that
|
||||||
|
" "daycoding" doesn't match;
|
||||||
|
" - g:autofenc_autodetect_commentexpr allows to configure the pattern
|
||||||
|
" for comment detection.
|
||||||
|
" - Introduced g:autofenc_enc_blacklist to disable some encodings. For
|
||||||
|
" example, the enca tool has a tendency to detect plain text files as
|
||||||
|
" UTF-7. With the blacklist, AutoFenc can be instructed to ignore those
|
||||||
|
" encodings.
|
||||||
|
" - The check for ASCII is set to be case-insensitive because enca reports
|
||||||
|
" this in uppercase, so the condition fails unless ignorecase is set.
|
||||||
|
" - Keeps changed CWD with 'autochdir' setting by temporarily disabling it.
|
||||||
|
" For example, suppose that a user has ":lcd .." in
|
||||||
|
" after/ftplugin/gitcommit.vim and that he is in the Git root directory,
|
||||||
|
" not the .git subdir when composing a commit message. The reload of the
|
||||||
|
" buffer by AutoFenc (via :edit) again triggered the automatic change of
|
||||||
|
" the working dir, and therefore the customization was lost. The
|
||||||
|
" 'autochdir' setting needs to be temporarily disabled to avoid that.
|
||||||
|
" - Added a support for plain Vim 7.0 in the shellescape() emulation from
|
||||||
|
" version 1.3.4. Otherwise, there were errors in Vim 7.0.
|
||||||
|
"
|
||||||
|
" 1.3.4 (2012-02-27)
|
||||||
|
" - Don't override when the user explicitly sets file encoding with ++enc
|
||||||
|
" (thanks to Benjamin Fritz).
|
||||||
|
" - Fixed TOhtml version detection (again) and made sure line continuations
|
||||||
|
" can actually be used (thanks to Benjamin Fritz and Ingo Karkat).
|
||||||
|
" - Disabled the option shellslash on Windows before calling shellescape()
|
||||||
|
" (it may cause problems on Windows, thanks for the tip goes to Benjamin
|
||||||
|
" Fritz).
|
||||||
|
"
|
||||||
|
" 1.3.3 (2011-11-29) Thanks to Ingo Karkat for the updates in this version.
|
||||||
|
" - Fixed a problem in the TOhtml detection when, for example,
|
||||||
|
" g:loaded_2html_plugin = 'vim7.3_v6'.
|
||||||
|
" - The return code of the call of an external program via
|
||||||
|
" system(ext_prog_cmd) is now checked. This prevents Vim interpreting an
|
||||||
|
" error message as an encoding.
|
||||||
|
" - shellescape() is now used instead of quoting file_path manually.
|
||||||
|
"
|
||||||
|
" 1.3.2 (2011-11-24) Thanks to Benjamin Fritz for the updates in this version.
|
||||||
|
" - Fixed the detection of the version of the TOhtml plugin.
|
||||||
|
"
|
||||||
|
" 1.3.1 (2011-07-23) Thanks to Benjamin Fritz for the updates in this version.
|
||||||
|
" - Fixed the plugin behavior when reloading a file with different settings.
|
||||||
|
"
|
||||||
|
" 1.3 (2011-04-22) Thanks to Benjamin Fritz for the updates in this version.
|
||||||
|
" - Added support for HTML version 5 encoding detection.
|
||||||
|
" - The script now dies gracefully in old Vims.
|
||||||
|
" - 'g:autofenc_autodetect_comment_num_of_lines' renamed to 'g:autofenc_autodetect_num_of_lines'
|
||||||
|
"
|
||||||
|
" 1.2.1 (2011-04-13)
|
||||||
|
" - Fixed a typo in a variable name (this resulted in an error in some
|
||||||
|
" occasions). Thanks to Charles Lee for pointing this bug out.
|
||||||
|
"
|
||||||
|
" 1.2 (2011-03-31) Thanks to Benjamin Fritz for the updates in this version.
|
||||||
|
" - TOhtml's IANA name/Vim encoding conversion functions are now used.
|
||||||
|
" - Changed BOM detection so it does not duplicate a check Vim already did by
|
||||||
|
" default (i.e. default to off if ucs-bom is in the 'fileencodings').
|
||||||
|
" - Put autocmds in the AutoFenc augroup for easier handling.
|
||||||
|
" - Made autocmd nested so we don't need to worry about restoring everything
|
||||||
|
" that other autocmds may set (e.g. syntax).
|
||||||
|
" - Jumplist or cursor position during detection are not affected.
|
||||||
|
" - The g:autofenc_autodetect_num_of_lines option is now used also in
|
||||||
|
" HTML/XML/CSS detection routines (previously only used for encoding
|
||||||
|
" specified in comments).
|
||||||
|
" - Improved HTML charset line regex.
|
||||||
|
" - Added an option (g:autofenc_emit_message) to emit messages about the
|
||||||
|
" detected/used encoding upon opening a file.
|
||||||
|
"
|
||||||
|
" 1.1.1 (2009-10-03)
|
||||||
|
" - Fixed the comment encoding detection function (the encoding was not
|
||||||
|
" detected if there were some alphanumeric characters before
|
||||||
|
" the "encoding" string, like in "# vim:fileencoding=<encoding-name>").
|
||||||
|
"
|
||||||
|
" 1.1 (2009-08-16)
|
||||||
|
" - Added three configuration possibilites to disable autodetection for
|
||||||
|
" specific files (based on file size, file type and file path).
|
||||||
|
" See script description for more info.
|
||||||
|
"
|
||||||
|
" 1.0.2 (2009-08-11)
|
||||||
|
" - Fixed the XML encoding detection function.
|
||||||
|
" - Minor code and documentation fixes.
|
||||||
|
"
|
||||||
|
" 1.0.1 (2009-08-02)
|
||||||
|
" - Encoding autodetection is now performed only if the opened file
|
||||||
|
" exists (is stored somewhere). So, for example, the autodetection
|
||||||
|
" is now not performed when a new file is opened.
|
||||||
|
" - Correctly works with .viminfo, where the last cursor position
|
||||||
|
" in the file is stored when exiting the file. In the previous version
|
||||||
|
" of this script, this information was sometimes ignored and the cursor
|
||||||
|
" was initially on the very last line in a file. If the user does not
|
||||||
|
" use this .viminfo feature (or he does not use .viminfo at all),
|
||||||
|
" then the cursor will be initially placed on the very first line.
|
||||||
|
" - (Hopefully) fixed the implementation of the function which sets
|
||||||
|
" the detected encoding.
|
||||||
|
"
|
||||||
|
" 1.0 (2009-07-26)
|
||||||
|
" - Initial release version of this script.
|
||||||
|
"
|
||||||
|
|
||||||
|
" Check if the plugin was already loaded. Also, die gracefully if the used Vim
|
||||||
|
" version is too old.
|
||||||
|
if exists('autofenc_loaded') || v:version < 700
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
" Make the loaded variable actually useful by including the version number
|
||||||
|
let autofenc_loaded = '1.5'
|
||||||
|
|
||||||
|
" This plugin uses line continuations
|
||||||
|
if &cpo =~ 'C'
|
||||||
|
let s:oldcpo = &cpo
|
||||||
|
set cpo-=C
|
||||||
|
endif
|
||||||
|
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Checks whether the selected variable (first parameter) is already set and
|
||||||
|
" if not, it sets it to the value of the second parameter.
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
function s:CheckAndSetVar(var, value)
|
||||||
|
if !exists(a:var)
|
||||||
|
exec 'let ' . a:var . ' = ' . string(a:value)
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Variables initialization (see script description for more information)
|
||||||
|
call s:CheckAndSetVar('g:autofenc_enable', 1)
|
||||||
|
call s:CheckAndSetVar('g:autofenc_emit_messages', 0)
|
||||||
|
call s:CheckAndSetVar('g:autofenc_max_file_size', 10485760)
|
||||||
|
call s:CheckAndSetVar('g:autofenc_disable_for_files_matching', '^[-_a-zA-Z0-9]\+://')
|
||||||
|
call s:CheckAndSetVar('g:autofenc_disable_for_file_types', [])
|
||||||
|
call s:CheckAndSetVar('g:autofenc_autodetect_bom', (&fileencodings !~# 'ucs-bom'))
|
||||||
|
call s:CheckAndSetVar('g:autofenc_autodetect_html', 1)
|
||||||
|
call s:CheckAndSetVar('g:autofenc_autodetect_html_filetypes', '^\(html.*\|xhtml\|aspperl\|aspvbs\|cf\|dtml\|gsp\|jsp\|mason\|php\|plp\|smarty\|spyce\|webmacro\)$')
|
||||||
|
call s:CheckAndSetVar('g:autofenc_autodetect_xml', 1)
|
||||||
|
call s:CheckAndSetVar('g:autofenc_autodetect_xml_filetypes', '^\(xml\|xquery\|xsd\|xslt\?\|ant\|dsl\|mxml\|svg\|wsh\|xbl\)$')
|
||||||
|
call s:CheckAndSetVar('g:autofenc_autodetect_css', 1)
|
||||||
|
call s:CheckAndSetVar('g:autofenc_autodetect_css_filetypes', '^\(css\|sass\)$')
|
||||||
|
call s:CheckAndSetVar('g:autofenc_autodetect_comment', 1)
|
||||||
|
call s:CheckAndSetVar('g:autofenc_autodetect_commentexpr', '\c^\A\(.*\s\)\?\(\(\(file\)\?en\)\?coding\|charset\)[:=]\?\s*\zs[-A-Za-z0-9_]\+')
|
||||||
|
call s:CheckAndSetVar('g:autofenc_autodetect_num_of_lines', 5)
|
||||||
|
call s:CheckAndSetVar('g:autofenc_autodetect_ext_prog', 1)
|
||||||
|
call s:CheckAndSetVar('g:autofenc_ext_prog_path', 'enca')
|
||||||
|
call s:CheckAndSetVar('g:autofenc_ext_prog_args', '-i -L czech')
|
||||||
|
call s:CheckAndSetVar('g:autofenc_ext_prog_unknown_fenc', '???')
|
||||||
|
call s:CheckAndSetVar('g:autofenc_enc_blacklist', '')
|
||||||
|
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Normalizes selected encoding and returns it, so it can be safely used as
|
||||||
|
" a new encoding. This function should be called before a new encoding is set.
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
function s:NormalizeEncoding(enc)
|
||||||
|
let nenc = tolower(a:enc)
|
||||||
|
|
||||||
|
" Recent versions of TOhtml runtime plugin have some nice charset to encoding
|
||||||
|
" functions which even allow user overrides. Use them if available.
|
||||||
|
let nenc2 = ""
|
||||||
|
silent! let nenc2 = tohtml#EncodingFromCharset(nenc)
|
||||||
|
if nenc2 != ""
|
||||||
|
return nenc2
|
||||||
|
" If the TOhtml function is unavailable, at least handle some canonical
|
||||||
|
" encoding names in Vim.
|
||||||
|
elseif nenc =~ 'iso[-_]8859-1'
|
||||||
|
return 'latin1'
|
||||||
|
elseif nenc =~ 'iso[-_]8859-2'
|
||||||
|
return 'latin2'
|
||||||
|
elseif nenc ==? 'gb2312'
|
||||||
|
return 'cp936' " GB2312 imprecisely means CP936 in HTML
|
||||||
|
elseif nenc =~ '\(cp\|win\(dows\)\?\)-125\d'
|
||||||
|
return 'cp125'.nenc[strlen(nenc)-1]
|
||||||
|
elseif nenc == 'utf8'
|
||||||
|
return 'utf-8'
|
||||||
|
elseif g:autofenc_emit_messages && nenc !~ '^\%(8bit-\|2byte-\)\?\%(latin[12]\|utf-8\|utf-16\%(le\)\?\|ucs-[24]\%(le\)\?\|iso-8859-\d\{1,2}\|cp\d\{3,4}\)$'
|
||||||
|
echomsg 'AutoFenc: detected unrecognized charset, trying fenc='.nenc
|
||||||
|
endif
|
||||||
|
|
||||||
|
return nenc
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Sets the selected file encoding. Returns 1 if the file was reloaded,
|
||||||
|
" 0 otherwise.
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
function s:SetFileEncoding(enc)
|
||||||
|
let nenc = s:NormalizeEncoding(a:enc)
|
||||||
|
|
||||||
|
" Check whether we're not trying to set the current file encoding
|
||||||
|
if nenc != "" && nenc !=? &fenc
|
||||||
|
if exists('&autochdir') && &autochdir
|
||||||
|
" Other autocmds may have changed the window's working directory;
|
||||||
|
" when 'autochdir' is set, the :edit will reset that, so temporarily
|
||||||
|
" disable the setting.
|
||||||
|
let old_autochdir = &autochdir
|
||||||
|
set noautochdir
|
||||||
|
endif
|
||||||
|
try
|
||||||
|
" Set the file encoding and reload it, keeping any user-specified
|
||||||
|
" fileformat, and keeping any bad bytes in case the header is wrong
|
||||||
|
" (this won't let the user save if a conversion error happened on
|
||||||
|
" read)
|
||||||
|
exec 'edit ++enc='.nenc.' ++ff='.&ff.' ++bad=keep'
|
||||||
|
finally
|
||||||
|
if exists('old_autochdir')
|
||||||
|
let &autochdir = old_autochdir
|
||||||
|
endif
|
||||||
|
endtry
|
||||||
|
|
||||||
|
" File was reloaded
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
" File was not reloaded
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Tries to detect a BOM (byte order mark) at the beginning of the file to
|
||||||
|
" detect a multibyte encoding. If there is a BOM, it returns the appropriate
|
||||||
|
" encoding, otherwise the empty string is returned.
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
function s:BOMEncodingDetection()
|
||||||
|
" Implementation of this function is based on a part of the FencsView.vim
|
||||||
|
" plugin by Ming Bai (http://www.vim.org/scripts/script.php?script_id=1708)
|
||||||
|
|
||||||
|
" Get the first line of the file
|
||||||
|
let file_content = readfile(expand('%:p'), 'b', 1)
|
||||||
|
if file_content == []
|
||||||
|
" Empty file
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
let first_line = file_content[0]
|
||||||
|
|
||||||
|
" Check whether it contains BOM and if so, return appropriate encoding
|
||||||
|
" Note: If the index is out of bounds, ahx is set to '' automatically
|
||||||
|
let ah1 = first_line[0]
|
||||||
|
let ah2 = first_line[1]
|
||||||
|
let ah3 = first_line[2]
|
||||||
|
let ah4 = first_line[3]
|
||||||
|
" TODO: I don't know why but if there is a NUL byte, the char2nr()
|
||||||
|
" function transforms it to a newline (0x0A) instead of 0x00...
|
||||||
|
let a1 = char2nr(ah1) == 0x0A ? 0x00 : char2nr(ah1)
|
||||||
|
let a2 = char2nr(ah2) == 0x0A ? 0x00 : char2nr(ah2)
|
||||||
|
let a3 = char2nr(ah3) == 0x0A ? 0x00 : char2nr(ah3)
|
||||||
|
let a4 = char2nr(ah4) == 0x0A ? 0x00 : char2nr(ah4)
|
||||||
|
if a1.a2.a3.a4 == 0x00.0x00.0xfe.0xff
|
||||||
|
return 'utf-32'
|
||||||
|
elseif a1.a2.a3.a4 == 0xff.0xfe.0x00.0x00
|
||||||
|
return 'utf-32le'
|
||||||
|
elseif a1.a2.a3 == 0xef.0xbb.0xbf
|
||||||
|
return 'utf-8'
|
||||||
|
elseif a1.a2 == 0xfe.0xff
|
||||||
|
return 'utf-16'
|
||||||
|
elseif a1.a2 == 0xff.0xfe
|
||||||
|
return 'utf-16le'
|
||||||
|
endif
|
||||||
|
|
||||||
|
" There was no legal BOM
|
||||||
|
return ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Tries the HTML way of encoding detection of the current file and returns the
|
||||||
|
" detected encoding (or the empty string, if the encoding was not detected).
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
function s:HTMLEncodingDetection()
|
||||||
|
" This method is based on the meta tag in the head of the HTML document
|
||||||
|
" (<meta http-equiv="Content-Type" ...)
|
||||||
|
|
||||||
|
" Store the actual position in the file and move to the very first line
|
||||||
|
" in the file
|
||||||
|
let curpos=getpos('.')
|
||||||
|
keepjumps 1
|
||||||
|
|
||||||
|
let enc = ''
|
||||||
|
|
||||||
|
" The following regexp is a modified version of the regexp found here:
|
||||||
|
" http://vim.wikia.com/wiki/Detect_encoding_from_the_charset_specified_in_HTML_files
|
||||||
|
let charset_line = search('\c<meta\_s\+http-equiv=\([''"]\?\)Content-Type\1\_s\+content=\([''"]\)[A-Za-z]\+/[+A-Za-z]\+;\_s*charset=[-A-Za-z0-9_]\+\2', 'nc', g:autofenc_autodetect_num_of_lines)
|
||||||
|
" If charset line was not found, try attributes in reverse order since order is
|
||||||
|
" not actually important.
|
||||||
|
if charset_line == 0
|
||||||
|
let charset_line = search('\c<meta\_s\+content=\([''"]\)[A-Za-z]\+/[+A-Za-z]\+;\_s*charset=[-A-Za-z0-9_]\+\1\_s\+http-equiv=\([''"]\?\)Content-Type\2', 'nc', g:autofenc_autodetect_num_of_lines)
|
||||||
|
endif
|
||||||
|
" Detect in HTML version 5
|
||||||
|
if charset_line == 0
|
||||||
|
let charset_line = search('\c<meta\_s\+charset=\([''"]\)[-A-Za-z0-9_]\+\1', 'nc', g:autofenc_autodetect_num_of_lines)
|
||||||
|
endif
|
||||||
|
if charset_line != 0
|
||||||
|
let enc = matchstr(getline(charset_line), 'charset=\([''"]\)\?\zs[-A-Za-z0-9_]\+\ze\1')
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Restore the original position in the file
|
||||||
|
|
||||||
|
call setpos('.', curpos)
|
||||||
|
|
||||||
|
return enc
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Tries the XML way of encoding detection of the current file and returns the
|
||||||
|
" detected encoding (or the empty string, if the encoding was not detected).
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
function s:XMLEncodingDetection()
|
||||||
|
" The first part of this method is based on the first line of XML files
|
||||||
|
" (<?xml version="..." encoding="..."?>)
|
||||||
|
|
||||||
|
" Store the actual position in the file and move to the very first line
|
||||||
|
" in the file
|
||||||
|
let curpos=getpos('.')
|
||||||
|
keepjumps 1
|
||||||
|
|
||||||
|
let enc = ''
|
||||||
|
|
||||||
|
let charset_line = search('\c<?xml\s\+version="[.0-9]\+"\s\+encoding="[-A-Za-z0-9_]\+"', 'nc', g:autofenc_autodetect_num_of_lines)
|
||||||
|
if charset_line != 0
|
||||||
|
let enc = matchstr(getline(charset_line), 'encoding="\zs[-A-Za-z0-9_]\+')
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Restore the original position in the file
|
||||||
|
call setpos('.', curpos)
|
||||||
|
|
||||||
|
" If there was no encoding specified, return utf-8 (the check for BOM
|
||||||
|
" should be done in another function - if the user wish that)
|
||||||
|
return enc != '' ? enc : 'utf-8'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Tries the CSS way of encoding detection of the current file and returns the
|
||||||
|
" detected encoding (or the empty string, if the encoding was not detected).
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
function s:CSSEncodingDetection()
|
||||||
|
" This method is based on the @charset 'at-rule'
|
||||||
|
" (see http://www.w3.org/International/questions/qa-css-charset)
|
||||||
|
|
||||||
|
" Store the actual position in the file and move to the very first line
|
||||||
|
" in the file
|
||||||
|
let curpos=getpos('.')
|
||||||
|
keepjumps 1
|
||||||
|
|
||||||
|
let enc = ''
|
||||||
|
|
||||||
|
" Note: The specs says that this line should be the first line in the file,
|
||||||
|
" but I'm searching every line in the file (some comments could perhaps
|
||||||
|
" precede the @charset in practice). If you don't like it, you are
|
||||||
|
" encouraged to change the code :).
|
||||||
|
let charset_line = search('\c^\s*@charset\s\+"[-A-Za-z0-9_]\+"', 'nc', g:autofenc_autodetect_num_of_lines)
|
||||||
|
if charset_line != 0
|
||||||
|
let enc = matchstr(getline(charset_line), '^\s*@charset\s\+"\zs[-A-Za-z0-9_]\+')
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Restore the original position in the file
|
||||||
|
call setpos('.', curpos)
|
||||||
|
|
||||||
|
return enc
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Tries to detect encoding via encoding specified in a comment. The file is
|
||||||
|
" searched for a line like '# encoding: utf-8' and the file encoding is
|
||||||
|
" returned according to this line. If there is no such line, the empty string
|
||||||
|
" is returned.
|
||||||
|
"
|
||||||
|
" The default format of the comment that specifies encoding is some
|
||||||
|
" non-alphabetic characters at the beginning of the line, then 'charset'
|
||||||
|
" or '[[file]en]coding' (without quotes, case insensitive), which is followed
|
||||||
|
" by optional ':' (and whitespace) and the name of the encoding.
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
function s:CommentEncodingDetection()
|
||||||
|
" Get first and last X lines from the file (according to the configuration)
|
||||||
|
let num_of_lines = g:autofenc_autodetect_num_of_lines
|
||||||
|
let lines_to_search_enc = readfile(expand('%:p'), '', num_of_lines)
|
||||||
|
let lines_to_search_enc += readfile(expand('%:p'), '', -num_of_lines)
|
||||||
|
|
||||||
|
" Check all of the returned lines
|
||||||
|
for line in lines_to_search_enc
|
||||||
|
let enc = matchstr(line, g:autofenc_autodetect_commentexpr)
|
||||||
|
if enc != ''
|
||||||
|
return enc
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
|
return ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" A safe version of shellescape. Use it instead of shellescape().
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
function s:SafeShellescape(path)
|
||||||
|
try
|
||||||
|
if exists('*shellescape')
|
||||||
|
" On MS Windows, we need to disable the option shellslash before calling
|
||||||
|
" shellescape() because otherwise, it may do stupid things (see, e.g.,
|
||||||
|
" http://vim.1045645.n5.nabble.com/shellescape-doesn-t-work-in-Windows-with-shellslash-set-td1211618.html).
|
||||||
|
if has("win32") || has("win64")
|
||||||
|
let old_ssl = &shellslash
|
||||||
|
set noshellslash
|
||||||
|
endif
|
||||||
|
return shellescape(a:path)
|
||||||
|
else
|
||||||
|
" The shellescape({string}) function only exists since Vim 7.0.111
|
||||||
|
" Try to crudely support plain Vim 7.0, too.
|
||||||
|
return '"'.substitute(a:path, '"', '\\"', 'g').'"'
|
||||||
|
endif
|
||||||
|
finally
|
||||||
|
if exists('old_ssl')
|
||||||
|
let &shellslash = old_ssl
|
||||||
|
endif
|
||||||
|
endtry
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Tries to detect the file encoding via selected external program.
|
||||||
|
" If the program is not executable or there is some error, it returns
|
||||||
|
" the empty string. Otherwise, the detected encoding is returned.
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
function s:ExtProgEncodingDetection()
|
||||||
|
if executable(g:autofenc_ext_prog_path)
|
||||||
|
" Get full path of the currently edited file
|
||||||
|
let file_path = expand('%:p')
|
||||||
|
|
||||||
|
" Create the complete external program command by appending program
|
||||||
|
" arguments and the current file path to the external program.
|
||||||
|
"
|
||||||
|
let ext_prog_cmd = g:autofenc_ext_prog_path.' '.g:autofenc_ext_prog_args.' '.s:SafeShellescape(file_path)
|
||||||
|
|
||||||
|
" Run it to get the encoding
|
||||||
|
let enc = system(ext_prog_cmd)
|
||||||
|
if v:shell_error != 0
|
||||||
|
" An error occurred
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Remove trailing newline from the output
|
||||||
|
" (system() removes any \r from the result automatically)
|
||||||
|
let enc = substitute(enc, '\n', '', '')
|
||||||
|
|
||||||
|
if enc != g:autofenc_ext_prog_unknown_fenc
|
||||||
|
" Encoding was (probably) detected successfully
|
||||||
|
return enc
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
return ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Tries to detect encoding of the current file via several ways (according
|
||||||
|
" to the configuration) and returns it. If the encoding was not detected
|
||||||
|
" successfully, it returns the empty string - this can happen because:
|
||||||
|
" - the file is in unknown encoding
|
||||||
|
" - the file is not stored anywhere (e.g. a new file was opened)
|
||||||
|
" - autodetection is disabled for this file (either the file is too large
|
||||||
|
" or autodetection is disabled for this file, see configuration)
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
function s:DetectFileEncoding()
|
||||||
|
" Check whether the autodetection should be performed
|
||||||
|
" (see function description for more information)
|
||||||
|
let file_path = expand('%:p')
|
||||||
|
let file_size = getfsize(file_path)
|
||||||
|
if file_path == '' ||
|
||||||
|
\ file_size > g:autofenc_max_file_size || file_size < 0 ||
|
||||||
|
\ file_path =~ g:autofenc_disable_for_files_matching ||
|
||||||
|
\ index(g:autofenc_disable_for_file_types, &ft, 0, 1) != -1
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
|
||||||
|
" BOM encoding detection
|
||||||
|
if g:autofenc_autodetect_bom
|
||||||
|
let enc = s:BOMEncodingDetection()
|
||||||
|
if enc != ''
|
||||||
|
return enc
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
" HTML encoding detection
|
||||||
|
if g:autofenc_autodetect_html && &filetype =~? g:autofenc_autodetect_html_filetypes
|
||||||
|
let enc = s:HTMLEncodingDetection()
|
||||||
|
if enc != ''
|
||||||
|
return enc
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
" XML encoding detection
|
||||||
|
if g:autofenc_autodetect_xml && &filetype =~? g:autofenc_autodetect_xml_filetypes
|
||||||
|
let enc = s:XMLEncodingDetection()
|
||||||
|
if enc != ''
|
||||||
|
return enc
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
" CSS encoding detection
|
||||||
|
if g:autofenc_autodetect_css && &filetype =~? g:autofenc_autodetect_css_filetypes
|
||||||
|
let enc = s:CSSEncodingDetection()
|
||||||
|
if enc != ''
|
||||||
|
return enc
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Comment encoding detection
|
||||||
|
if g:autofenc_autodetect_comment
|
||||||
|
let enc = s:CommentEncodingDetection()
|
||||||
|
if enc != ''
|
||||||
|
return enc
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
" External program encoding detection
|
||||||
|
if g:autofenc_autodetect_ext_prog
|
||||||
|
let enc = s:ExtProgEncodingDetection()
|
||||||
|
if enc != ''
|
||||||
|
return enc
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Encoding was not detected
|
||||||
|
return ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Main plugin function. Tries to autodetect the correct file encoding
|
||||||
|
" and sets the detected one (if any). If the ASCII encoding is detected,
|
||||||
|
" it does nothing so allow Vim to set its internal encoding instead.
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
function s:DetectAndSetFileEncoding()
|
||||||
|
let enc = s:DetectFileEncoding()
|
||||||
|
|
||||||
|
" don't call again on the nested trigger from the edit
|
||||||
|
let b:autofenc_done = enc
|
||||||
|
|
||||||
|
if (enc != '') && (enc !=? 'ascii') &&
|
||||||
|
\ (g:autofenc_enc_blacklist == '' || enc !~? g:autofenc_enc_blacklist)
|
||||||
|
if s:SetFileEncoding(enc)
|
||||||
|
if g:autofenc_emit_messages
|
||||||
|
echomsg "AutoFenc: Detected [".enc."] from file, loaded with fenc=".&fenc
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Set the detected file encoding
|
||||||
|
if g:autofenc_enable
|
||||||
|
augroup AutoFenc
|
||||||
|
au!
|
||||||
|
" We need to check that we're not in the middle of a reload due to this
|
||||||
|
" plugin otherwise can recurse forever. But unlet the variable to allow
|
||||||
|
" re-detection on the next read of this buffer if it is just unloaded.
|
||||||
|
au BufRead * nested
|
||||||
|
\ if !exists('b:autofenc_done') |
|
||||||
|
\ if v:cmdarg !~ '++enc' |
|
||||||
|
\ call s:DetectAndSetFileEncoding() |
|
||||||
|
\ endif |
|
||||||
|
\ else |
|
||||||
|
\ unlet b:autofenc_done |
|
||||||
|
\ endif
|
||||||
|
augroup END
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Restore line continuations (and the rest of &cpo) when done
|
||||||
|
if exists('s:oldcpo')
|
||||||
|
let &cpo = s:oldcpo
|
||||||
|
unlet s:oldcpo
|
||||||
|
endif
|
||||||
|
|
||||||
|
" vim: noet
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,840 @@
|
||||||
|
" Copyright (c) 1998-2006
|
||||||
|
" Michael Sharpe <feline@irendi.com>
|
||||||
|
"
|
||||||
|
" We grant permission to use, copy modify, distribute, and sell this
|
||||||
|
" software for any purpose without fee, provided that the above copyright
|
||||||
|
" notice and this text are not removed. We make no guarantee about the
|
||||||
|
" suitability of this software for any purpose and we are not liable
|
||||||
|
" for any damages resulting from its use. Further, we are under no
|
||||||
|
" obligation to maintain or extend this software. It is provided on an
|
||||||
|
" "as is" basis without any expressed or implied warranty.
|
||||||
|
|
||||||
|
" Directory & regex enhancements added by Bindu Wavell who is well known on
|
||||||
|
" vim.sf.net
|
||||||
|
"
|
||||||
|
" Patch for spaces in files/directories from Nathan Stien (also reported by
|
||||||
|
" Soeren Sonnenburg)
|
||||||
|
|
||||||
|
" Do not load a.vim if is has already been loaded.
|
||||||
|
if exists("loaded_alternateFile")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
if (v:progname == "ex")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let loaded_alternateFile = 1
|
||||||
|
|
||||||
|
let alternateExtensionsDict = {}
|
||||||
|
|
||||||
|
" setup the default set of alternate extensions. The user can override in thier
|
||||||
|
" .vimrc if the defaults are not suitable. To override in a .vimrc simply set a
|
||||||
|
" g:alternateExtensions_<EXT> variable to a comma separated list of alternates,
|
||||||
|
" where <EXT> is the extension to map.
|
||||||
|
" E.g. let g:alternateExtensions_CPP = "inc,h,H,HPP,hpp"
|
||||||
|
" let g:alternateExtensions_{'aspx.cs'} = "aspx"
|
||||||
|
|
||||||
|
|
||||||
|
" This variable will be increased when an extension with greater number of dots
|
||||||
|
" is added by the AddAlternateExtensionMapping call.
|
||||||
|
let s:maxDotsInExtension = 1
|
||||||
|
|
||||||
|
" Function : AddAlternateExtensionMapping (PRIVATE)
|
||||||
|
" Purpose : simple helper function to add the default alternate extension
|
||||||
|
" mappings.
|
||||||
|
" Args : extension -- the extension to map
|
||||||
|
" alternates -- comma separated list of alternates extensions
|
||||||
|
" Returns : nothing
|
||||||
|
" Author : Michael Sharpe <feline@irendi.com>
|
||||||
|
function! <SID>AddAlternateExtensionMapping(extension, alternates)
|
||||||
|
" This code does not actually work for variables like foo{'a.b.c.d.e'}
|
||||||
|
"let varName = "g:alternateExtensions_" . a:extension
|
||||||
|
"if (!exists(varName))
|
||||||
|
" let g:alternateExtensions_{a:extension} = a:alternates
|
||||||
|
"endif
|
||||||
|
|
||||||
|
" This code handles extensions which contains a dot. exists() fails with
|
||||||
|
" such names.
|
||||||
|
"let v:errmsg = ""
|
||||||
|
" FIXME this line causes ex to return 1 instead of 0 for some reason??
|
||||||
|
"silent! echo g:alternateExtensions_{a:extension}
|
||||||
|
"if (v:errmsg != "")
|
||||||
|
"let g:alternateExtensions_{a:extension} = a:alternates
|
||||||
|
"endif
|
||||||
|
|
||||||
|
let g:alternateExtensionsDict[a:extension] = a:alternates
|
||||||
|
let dotsNumber = strlen(substitute(a:extension, "[^.]", "", "g"))
|
||||||
|
if s:maxDotsInExtension < dotsNumber
|
||||||
|
let s:maxDotsInExtension = dotsNumber
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
" Add all the default extensions
|
||||||
|
" Mappings for C and C++
|
||||||
|
call <SID>AddAlternateExtensionMapping('h',"c,cpp,cxx,cc,CC")
|
||||||
|
call <SID>AddAlternateExtensionMapping('H',"C,CPP,CXX,CC")
|
||||||
|
call <SID>AddAlternateExtensionMapping('hpp',"cpp,c")
|
||||||
|
call <SID>AddAlternateExtensionMapping('HPP',"CPP,C")
|
||||||
|
call <SID>AddAlternateExtensionMapping('c',"h")
|
||||||
|
call <SID>AddAlternateExtensionMapping('C',"H")
|
||||||
|
call <SID>AddAlternateExtensionMapping('cpp',"h,hpp")
|
||||||
|
call <SID>AddAlternateExtensionMapping('CPP',"H,HPP")
|
||||||
|
call <SID>AddAlternateExtensionMapping('cc',"h")
|
||||||
|
call <SID>AddAlternateExtensionMapping('CC',"H,h")
|
||||||
|
call <SID>AddAlternateExtensionMapping('cxx',"h")
|
||||||
|
call <SID>AddAlternateExtensionMapping('CXX',"H")
|
||||||
|
" Mappings for PSL7
|
||||||
|
call <SID>AddAlternateExtensionMapping('psl',"ph")
|
||||||
|
call <SID>AddAlternateExtensionMapping('ph',"psl")
|
||||||
|
" Mappings for ADA
|
||||||
|
call <SID>AddAlternateExtensionMapping('adb',"ads")
|
||||||
|
call <SID>AddAlternateExtensionMapping('ads',"adb")
|
||||||
|
" Mappings for lex and yacc files
|
||||||
|
call <SID>AddAlternateExtensionMapping('l',"y,yacc,ypp")
|
||||||
|
call <SID>AddAlternateExtensionMapping('lex',"yacc,y,ypp")
|
||||||
|
call <SID>AddAlternateExtensionMapping('lpp',"ypp,y,yacc")
|
||||||
|
call <SID>AddAlternateExtensionMapping('y',"l,lex,lpp")
|
||||||
|
call <SID>AddAlternateExtensionMapping('yacc',"lex,l,lpp")
|
||||||
|
call <SID>AddAlternateExtensionMapping('ypp',"lpp,l,lex")
|
||||||
|
" Mappings for OCaml
|
||||||
|
call <SID>AddAlternateExtensionMapping('ml',"mli")
|
||||||
|
call <SID>AddAlternateExtensionMapping('mli',"ml")
|
||||||
|
" ASP stuff
|
||||||
|
call <SID>AddAlternateExtensionMapping('aspx.cs', 'aspx')
|
||||||
|
call <SID>AddAlternateExtensionMapping('aspx.vb', 'aspx')
|
||||||
|
call <SID>AddAlternateExtensionMapping('aspx', 'aspx.cs,aspx.vb')
|
||||||
|
|
||||||
|
" Setup default search path, unless the user has specified
|
||||||
|
" a path in their [._]vimrc.
|
||||||
|
if (!exists('g:alternateSearchPath'))
|
||||||
|
let g:alternateSearchPath = 'sfr:../source,sfr:../src,sfr:../include,sfr:../inc'
|
||||||
|
endif
|
||||||
|
|
||||||
|
" If this variable is true then a.vim will not alternate to a file/buffer which
|
||||||
|
" does not exist. E.g while editing a.c and the :A will not swtich to a.h
|
||||||
|
" unless it exists.
|
||||||
|
if (!exists('g:alternateNoDefaultAlternate'))
|
||||||
|
" by default a.vim will alternate to a file which does not exist
|
||||||
|
let g:alternateNoDefaultAlternate = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
" If this variable is true then a.vim will convert the alternate filename to a
|
||||||
|
" filename relative to the current working directory.
|
||||||
|
" Feature by Nathan Huizinga
|
||||||
|
if (!exists('g:alternateRelativeFiles'))
|
||||||
|
" by default a.vim will not convert the filename to one relative to the
|
||||||
|
" current working directory
|
||||||
|
let g:alternateRelativeFiles = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
" Function : GetNthItemFromList (PRIVATE)
|
||||||
|
" Purpose : Support reading items from a comma seperated list
|
||||||
|
" Used to iterate all the extensions in an extension spec
|
||||||
|
" Used to iterate all path prefixes
|
||||||
|
" Args : list -- the list (extension spec, file paths) to iterate
|
||||||
|
" n -- the extension to get
|
||||||
|
" Returns : the nth item (extension, path) from the list (extension
|
||||||
|
" spec), or "" for failure
|
||||||
|
" Author : Michael Sharpe <feline@irendi.com>
|
||||||
|
" History : Renamed from GetNthExtensionFromSpec to GetNthItemFromList
|
||||||
|
" to reflect a more generic use of this function. -- Bindu
|
||||||
|
function! <SID>GetNthItemFromList(list, n)
|
||||||
|
let itemStart = 0
|
||||||
|
let itemEnd = -1
|
||||||
|
let pos = 0
|
||||||
|
let item = ""
|
||||||
|
let i = 0
|
||||||
|
while (i != a:n)
|
||||||
|
let itemStart = itemEnd + 1
|
||||||
|
let itemEnd = match(a:list, ",", itemStart)
|
||||||
|
let i = i + 1
|
||||||
|
if (itemEnd == -1)
|
||||||
|
if (i == a:n)
|
||||||
|
let itemEnd = strlen(a:list)
|
||||||
|
endif
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
endwhile
|
||||||
|
if (itemEnd != -1)
|
||||||
|
let item = strpart(a:list, itemStart, itemEnd - itemStart)
|
||||||
|
endif
|
||||||
|
return item
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Function : ExpandAlternatePath (PRIVATE)
|
||||||
|
" Purpose : Expand path info. A path with a prefix of "wdr:" will be
|
||||||
|
" treated as relative to the working directory (i.e. the
|
||||||
|
" directory where vim was started.) A path prefix of "abs:" will
|
||||||
|
" be treated as absolute. No prefix or "sfr:" will result in the
|
||||||
|
" path being treated as relative to the source file (see sfPath
|
||||||
|
" argument).
|
||||||
|
"
|
||||||
|
" A prefix of "reg:" will treat the pathSpec as a regular
|
||||||
|
" expression substitution that is applied to the source file
|
||||||
|
" path. The format is:
|
||||||
|
"
|
||||||
|
" reg:<sep><pattern><sep><subst><sep><flag><sep>
|
||||||
|
"
|
||||||
|
" <sep> seperator character, we often use one of [/|%#]
|
||||||
|
" <pattern> is what you are looking for
|
||||||
|
" <subst> is the output pattern
|
||||||
|
" <flag> can be g for global replace or empty
|
||||||
|
"
|
||||||
|
" EXAMPLE: 'reg:/inc/src/g/' will replace every instance
|
||||||
|
" of 'inc' with 'src' in the source file path. It is possible
|
||||||
|
" to use match variables so you could do something like:
|
||||||
|
" 'reg:|src/\([^/]*\)|inc/\1||' (see 'help :substitute',
|
||||||
|
" 'help pattern' and 'help sub-replace-special' for more details
|
||||||
|
"
|
||||||
|
" NOTE: a.vim uses ',' (comma) internally so DON'T use it
|
||||||
|
" in your regular expressions or other pathSpecs unless you update
|
||||||
|
" the rest of the a.vim code to use some other seperator.
|
||||||
|
"
|
||||||
|
" Args : pathSpec -- path component (or substitution patterns)
|
||||||
|
" sfPath -- source file path
|
||||||
|
" Returns : a path that can be used by AlternateFile()
|
||||||
|
" Author : Bindu Wavell <bindu@wavell.net>
|
||||||
|
function! <SID>ExpandAlternatePath(pathSpec, sfPath)
|
||||||
|
let prfx = strpart(a:pathSpec, 0, 4)
|
||||||
|
if (prfx == "wdr:" || prfx == "abs:")
|
||||||
|
let path = strpart(a:pathSpec, 4)
|
||||||
|
elseif (prfx == "reg:")
|
||||||
|
let re = strpart(a:pathSpec, 4)
|
||||||
|
let sep = strpart(re, 0, 1)
|
||||||
|
let patend = match(re, sep, 1)
|
||||||
|
let pat = strpart(re, 1, patend - 1)
|
||||||
|
let subend = match(re, sep, patend + 1)
|
||||||
|
let sub = strpart(re, patend+1, subend - patend - 1)
|
||||||
|
let flag = strpart(re, strlen(re) - 2)
|
||||||
|
if (flag == sep)
|
||||||
|
let flag = ''
|
||||||
|
endif
|
||||||
|
let path = substitute(a:sfPath, pat, sub, flag)
|
||||||
|
"call confirm('PAT: [' . pat . '] SUB: [' . sub . ']')
|
||||||
|
"call confirm(a:sfPath . ' => ' . path)
|
||||||
|
else
|
||||||
|
let path = a:pathSpec
|
||||||
|
if (prfx == "sfr:")
|
||||||
|
let path = strpart(path, 4)
|
||||||
|
endif
|
||||||
|
let path = a:sfPath . "/" . path
|
||||||
|
endif
|
||||||
|
return path
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Function : FindFileInSearchPath (PRIVATE)
|
||||||
|
" Purpose : Searches for a file in the search path list
|
||||||
|
" Args : filename -- name of the file to search for
|
||||||
|
" pathList -- the path list to search
|
||||||
|
" relPathBase -- the path which relative paths are expanded from
|
||||||
|
" Returns : An expanded filename if found, the empty string otherwise
|
||||||
|
" Author : Michael Sharpe (feline@irendi.com)
|
||||||
|
" History : inline code written by Bindu Wavell originally
|
||||||
|
function! <SID>FindFileInSearchPath(fileName, pathList, relPathBase)
|
||||||
|
let filepath = ""
|
||||||
|
let m = 1
|
||||||
|
let pathListLen = strlen(a:pathList)
|
||||||
|
if (pathListLen > 0)
|
||||||
|
while (1)
|
||||||
|
let pathSpec = <SID>GetNthItemFromList(a:pathList, m)
|
||||||
|
if (pathSpec != "")
|
||||||
|
let path = <SID>ExpandAlternatePath(pathSpec, a:relPathBase)
|
||||||
|
let fullname = path . "/" . a:fileName
|
||||||
|
let foundMatch = <SID>BufferOrFileExists(fullname)
|
||||||
|
if (foundMatch)
|
||||||
|
let filepath = fullname
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
let m = m + 1
|
||||||
|
endwhile
|
||||||
|
endif
|
||||||
|
return filepath
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Function : FindFileInSearchPathEx (PRIVATE)
|
||||||
|
" Purpose : Searches for a file in the search path list
|
||||||
|
" Args : filename -- name of the file to search for
|
||||||
|
" pathList -- the path list to search
|
||||||
|
" relPathBase -- the path which relative paths are expanded from
|
||||||
|
" count -- find the count'th occurence of the file on the path
|
||||||
|
" Returns : An expanded filename if found, the empty string otherwise
|
||||||
|
" Author : Michael Sharpe (feline@irendi.com)
|
||||||
|
" History : Based on <SID>FindFileInSearchPath() but with extensions
|
||||||
|
function! <SID>FindFileInSearchPathEx(fileName, pathList, relPathBase, count)
|
||||||
|
let filepath = ""
|
||||||
|
let m = 1
|
||||||
|
let spath = ""
|
||||||
|
let pathListLen = strlen(a:pathList)
|
||||||
|
if (pathListLen > 0)
|
||||||
|
while (1)
|
||||||
|
let pathSpec = <SID>GetNthItemFromList(a:pathList, m)
|
||||||
|
if (pathSpec != "")
|
||||||
|
let path = <SID>ExpandAlternatePath(pathSpec, a:relPathBase)
|
||||||
|
if (spath != "")
|
||||||
|
let spath = spath . ','
|
||||||
|
endif
|
||||||
|
let spath = spath . path
|
||||||
|
else
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
let m = m + 1
|
||||||
|
endwhile
|
||||||
|
endif
|
||||||
|
|
||||||
|
if (&path != "")
|
||||||
|
if (spath != "")
|
||||||
|
let spath = spath . ','
|
||||||
|
endif
|
||||||
|
let spath = spath . &path
|
||||||
|
endif
|
||||||
|
|
||||||
|
let filepath = findfile(a:fileName, spath, a:count)
|
||||||
|
return filepath
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Function : EnumerateFilesByExtension (PRIVATE)
|
||||||
|
" Purpose : enumerates all files by a particular list of alternate extensions.
|
||||||
|
" Args : path -- path of a file (not including the file)
|
||||||
|
" baseName -- base name of the file to be expanded
|
||||||
|
" extension -- extension whose alternates are to be enumerated
|
||||||
|
" Returns : comma separated list of files with extensions
|
||||||
|
" Author : Michael Sharpe <feline@irendi.com>
|
||||||
|
function! EnumerateFilesByExtension(path, baseName, extension)
|
||||||
|
let enumeration = ""
|
||||||
|
let extSpec = ""
|
||||||
|
let v:errmsg = ""
|
||||||
|
silent! echo g:alternateExtensions_{a:extension}
|
||||||
|
if (v:errmsg == "")
|
||||||
|
let extSpec = g:alternateExtensions_{a:extension}
|
||||||
|
endif
|
||||||
|
if (extSpec == "")
|
||||||
|
if (has_key(g:alternateExtensionsDict, a:extension))
|
||||||
|
let extSpec = g:alternateExtensionsDict[a:extension]
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
if (extSpec != "")
|
||||||
|
let n = 1
|
||||||
|
let done = 0
|
||||||
|
while (!done)
|
||||||
|
let ext = <SID>GetNthItemFromList(extSpec, n)
|
||||||
|
if (ext != "")
|
||||||
|
if (a:path != "")
|
||||||
|
let newFilename = a:path . "/" . a:baseName . "." . ext
|
||||||
|
else
|
||||||
|
let newFilename = a:baseName . "." . ext
|
||||||
|
endif
|
||||||
|
if (enumeration == "")
|
||||||
|
let enumeration = newFilename
|
||||||
|
else
|
||||||
|
let enumeration = enumeration . "," . newFilename
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
let done = 1
|
||||||
|
endif
|
||||||
|
let n = n + 1
|
||||||
|
endwhile
|
||||||
|
endif
|
||||||
|
return enumeration
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Function : EnumerateFilesByExtensionInPath (PRIVATE)
|
||||||
|
" Purpose : enumerates all files by expanding the path list and the extension
|
||||||
|
" list.
|
||||||
|
" Args : baseName -- base name of the file
|
||||||
|
" extension -- extension whose alternates are to be enumerated
|
||||||
|
" pathList -- the list of paths to enumerate
|
||||||
|
" relPath -- the path of the current file for expansion of relative
|
||||||
|
" paths in the path list.
|
||||||
|
" Returns : A comma separated list of paths with extensions
|
||||||
|
" Author : Michael Sharpe <feline@irendi.com>
|
||||||
|
function! EnumerateFilesByExtensionInPath(baseName, extension, pathList, relPathBase)
|
||||||
|
let enumeration = ""
|
||||||
|
let filepath = ""
|
||||||
|
let m = 1
|
||||||
|
let pathListLen = strlen(a:pathList)
|
||||||
|
if (pathListLen > 0)
|
||||||
|
while (1)
|
||||||
|
let pathSpec = <SID>GetNthItemFromList(a:pathList, m)
|
||||||
|
if (pathSpec != "")
|
||||||
|
let path = <SID>ExpandAlternatePath(pathSpec, a:relPathBase)
|
||||||
|
let pe = EnumerateFilesByExtension(path, a:baseName, a:extension)
|
||||||
|
if (enumeration == "")
|
||||||
|
let enumeration = pe
|
||||||
|
else
|
||||||
|
let enumeration = enumeration . "," . pe
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
let m = m + 1
|
||||||
|
endwhile
|
||||||
|
endif
|
||||||
|
return enumeration
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Function : DetermineExtension (PRIVATE)
|
||||||
|
" Purpose : Determines the extension of a filename based on the register
|
||||||
|
" alternate extension. This allow extension which contain dots to
|
||||||
|
" be considered. E.g. foo.aspx.cs to foo.aspx where an alternate
|
||||||
|
" exists for the aspx.cs extension. Note that this will only accept
|
||||||
|
" extensions which contain less than 5 dots. This is only
|
||||||
|
" implemented in this manner for simplicity...it is doubtful that
|
||||||
|
" this will be a restriction in non-contrived situations.
|
||||||
|
" Args : The path to the file to find the extension in
|
||||||
|
" Returns : The matched extension if any
|
||||||
|
" Author : Michael Sharpe (feline@irendi.com)
|
||||||
|
" History : idea from Tom-Erik Duestad
|
||||||
|
" Notes : there is some magic occuring here. The exists() function does not
|
||||||
|
" work well when the curly brace variable has dots in it. And why
|
||||||
|
" should it, dots are not valid in variable names. But the exists
|
||||||
|
" function is wierd too. Lets say foo_c does exist. Then
|
||||||
|
" exists("foo_c.e.f") will be true...even though the variable does
|
||||||
|
" not exist. However the curly brace variables do work when the
|
||||||
|
" variable has dots in it. E.g foo_{'c'} is different from
|
||||||
|
" foo_{'c.d.e'}...and foo_{'c'} is identical to foo_c and
|
||||||
|
" foo_{'c.d.e'} is identical to foo_c.d.e right? Yes in the current
|
||||||
|
" implementation of vim. To trick vim to test for existence of such
|
||||||
|
" variables echo the curly brace variable and look for an error
|
||||||
|
" message.
|
||||||
|
function! DetermineExtension(path)
|
||||||
|
let mods = ":t"
|
||||||
|
let i = 0
|
||||||
|
while i <= s:maxDotsInExtension
|
||||||
|
let mods = mods . ":e"
|
||||||
|
let extension = fnamemodify(a:path, mods)
|
||||||
|
if (has_key(g:alternateExtensionsDict, extension))
|
||||||
|
return extension
|
||||||
|
endif
|
||||||
|
let v:errmsg = ""
|
||||||
|
silent! echo g:alternateExtensions_{extension}
|
||||||
|
if (v:errmsg == "")
|
||||||
|
return extension
|
||||||
|
endif
|
||||||
|
let i = i + 1
|
||||||
|
endwhile
|
||||||
|
return ""
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Function : AlternateFile (PUBLIC)
|
||||||
|
" Purpose : Opens a new buffer by looking at the extension of the current
|
||||||
|
" buffer and finding the corresponding file. E.g. foo.c <--> foo.h
|
||||||
|
" Args : accepts one argument. If present it used the argument as the new
|
||||||
|
" extension.
|
||||||
|
" Returns : nothing
|
||||||
|
" Author : Michael Sharpe <feline@irendi.com>
|
||||||
|
" History : + When an alternate can't be found in the same directory as the
|
||||||
|
" source file, a search path will be traversed looking for the
|
||||||
|
" alternates.
|
||||||
|
" + Moved some code into a separate function, minor optimization
|
||||||
|
" + rework to favor files in memory based on complete enumeration of
|
||||||
|
" all files extensions and paths
|
||||||
|
function! AlternateFile(splitWindow, ...)
|
||||||
|
let extension = DetermineExtension(expand("%:p"))
|
||||||
|
let baseName = substitute(expand("%:t"), "\." . extension . '$', "", "")
|
||||||
|
let currentPath = expand("%:p:h")
|
||||||
|
|
||||||
|
if (a:0 != 0)
|
||||||
|
let newFullname = currentPath . "/" . baseName . "." . a:1
|
||||||
|
call <SID>FindOrCreateBuffer(newFullname, a:splitWindow, 0)
|
||||||
|
else
|
||||||
|
let allfiles = ""
|
||||||
|
if (extension != "")
|
||||||
|
let allfiles1 = EnumerateFilesByExtension(currentPath, baseName, extension)
|
||||||
|
let allfiles2 = EnumerateFilesByExtensionInPath(baseName, extension, g:alternateSearchPath, currentPath)
|
||||||
|
|
||||||
|
if (allfiles1 != "")
|
||||||
|
if (allfiles2 != "")
|
||||||
|
let allfiles = allfiles1 . ',' . allfiles2
|
||||||
|
else
|
||||||
|
let allfiles = allfiles1
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
let allfiles = allfiles2
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if (allfiles != "")
|
||||||
|
let bestFile = ""
|
||||||
|
let bestScore = 0
|
||||||
|
let score = 0
|
||||||
|
let n = 1
|
||||||
|
|
||||||
|
let onefile = <SID>GetNthItemFromList(allfiles, n)
|
||||||
|
let bestFile = onefile
|
||||||
|
while (onefile != "" && score < 2)
|
||||||
|
let score = <SID>BufferOrFileExists(onefile)
|
||||||
|
if (score > bestScore)
|
||||||
|
let bestScore = score
|
||||||
|
let bestFile = onefile
|
||||||
|
endif
|
||||||
|
let n = n + 1
|
||||||
|
let onefile = <SID>GetNthItemFromList(allfiles, n)
|
||||||
|
endwhile
|
||||||
|
|
||||||
|
if (bestScore == 0 && g:alternateNoDefaultAlternate == 1)
|
||||||
|
echo "No existing alternate available"
|
||||||
|
else
|
||||||
|
call <SID>FindOrCreateBuffer(bestFile, a:splitWindow, 1)
|
||||||
|
let b:AlternateAllFiles = allfiles
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
echo "No alternate file/buffer available"
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Function : AlternateOpenFileUnderCursor (PUBLIC)
|
||||||
|
" Purpose : Opens file under the cursor
|
||||||
|
" Args : splitWindow -- indicates how to open the file
|
||||||
|
" Returns : Nothing
|
||||||
|
" Author : Michael Sharpe (feline@irendi.com) www.irendi.com
|
||||||
|
function! AlternateOpenFileUnderCursor(splitWindow,...)
|
||||||
|
let cursorFile = (a:0 > 0) ? a:1 : expand("<cfile>")
|
||||||
|
let currentPath = expand("%:p:h")
|
||||||
|
let openCount = 1
|
||||||
|
|
||||||
|
let fileName = <SID>FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, openCount)
|
||||||
|
if (fileName != "")
|
||||||
|
call <SID>FindOrCreateBuffer(fileName, a:splitWindow, 1)
|
||||||
|
let b:openCount = openCount
|
||||||
|
let b:cursorFile = cursorFile
|
||||||
|
let b:currentPath = currentPath
|
||||||
|
else
|
||||||
|
echo "Can't find file"
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Function : AlternateOpenNextFile (PUBLIC)
|
||||||
|
" Purpose : Opens the next file corresponding to the search which found the
|
||||||
|
" current file
|
||||||
|
" Args : bang -- indicates what to do if the current file has not been
|
||||||
|
" saved
|
||||||
|
" Returns : nothing
|
||||||
|
" Author : Michael Sharpe (feline@irendi.com) www.irendi.com
|
||||||
|
function! AlternateOpenNextFile(bang)
|
||||||
|
let cursorFile = ""
|
||||||
|
if (exists("b:cursorFile"))
|
||||||
|
let cursorFile = b:cursorFile
|
||||||
|
endif
|
||||||
|
|
||||||
|
let currentPath = ""
|
||||||
|
if (exists("b:currentPath"))
|
||||||
|
let currentPath = b:currentPath
|
||||||
|
endif
|
||||||
|
|
||||||
|
let openCount = 0
|
||||||
|
if (exists("b:openCount"))
|
||||||
|
let openCount = b:openCount + 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if (cursorFile != "" && currentPath != "" && openCount != 0)
|
||||||
|
let fileName = <SID>FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, openCount)
|
||||||
|
if (fileName != "")
|
||||||
|
call <SID>FindOrCreateBuffer(fileName, "n".a:bang, 0)
|
||||||
|
let b:openCount = openCount
|
||||||
|
let b:cursorFile = cursorFile
|
||||||
|
let b:currentPath = currentPath
|
||||||
|
else
|
||||||
|
let fileName = <SID>FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, 1)
|
||||||
|
if (fileName != "")
|
||||||
|
call <SID>FindOrCreateBuffer(fileName, "n".a:bang, 0)
|
||||||
|
let b:openCount = 1
|
||||||
|
let b:cursorFile = cursorFile
|
||||||
|
let b:currentPath = currentPath
|
||||||
|
else
|
||||||
|
echo "Can't find next file"
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
comm! -nargs=? -bang IH call AlternateOpenFileUnderCursor("n<bang>", <f-args>)
|
||||||
|
comm! -nargs=? -bang IHS call AlternateOpenFileUnderCursor("h<bang>", <f-args>)
|
||||||
|
comm! -nargs=? -bang IHV call AlternateOpenFileUnderCursor("v<bang>", <f-args>)
|
||||||
|
comm! -nargs=? -bang IHT call AlternateOpenFileUnderCursor("t<bang>", <f-args>)
|
||||||
|
comm! -nargs=? -bang IHN call AlternateOpenNextFile("<bang>")
|
||||||
|
imap <Leader>ih <ESC>:IHS<CR>
|
||||||
|
nmap <Leader>ih :IHS<CR>
|
||||||
|
imap <Leader>is <ESC>:IHS<CR>:A<CR>
|
||||||
|
nmap <Leader>is :IHS<CR>:A<CR>
|
||||||
|
imap <Leader>ihn <ESC>:IHN<CR>
|
||||||
|
nmap <Leader>ihn :IHN<CR>
|
||||||
|
|
||||||
|
"function! <SID>PrintList(theList)
|
||||||
|
" let n = 1
|
||||||
|
" let oneFile = <SID>GetNthItemFromList(a:theList, n)
|
||||||
|
" while (oneFile != "")
|
||||||
|
" let n = n + 1
|
||||||
|
" let oneFile = <SID>GetNthItemFromList(a:theList, n)
|
||||||
|
" endwhile
|
||||||
|
"endfunction
|
||||||
|
|
||||||
|
" Function : NextAlternate (PUBLIC)
|
||||||
|
" Purpose : Used to cycle through any other alternate file which existed on
|
||||||
|
" the search path.
|
||||||
|
" Args : bang (IN) - used to implement the AN vs AN! functionality
|
||||||
|
" Returns : nothing
|
||||||
|
" Author : Michael Sharpe <feline@irendi.com>
|
||||||
|
function! NextAlternate(bang)
|
||||||
|
if (exists('b:AlternateAllFiles'))
|
||||||
|
let currentFile = expand("%")
|
||||||
|
let n = 1
|
||||||
|
let onefile = <SID>GetNthItemFromList(b:AlternateAllFiles, n)
|
||||||
|
while (onefile != "" && !<SID>EqualFilePaths(fnamemodify(onefile,":p"), fnamemodify(currentFile,":p")))
|
||||||
|
let n = n + 1
|
||||||
|
let onefile = <SID>GetNthItemFromList(b:AlternateAllFiles, n)
|
||||||
|
endwhile
|
||||||
|
|
||||||
|
if (onefile != "")
|
||||||
|
let stop = n
|
||||||
|
let n = n + 1
|
||||||
|
let foundAlternate = 0
|
||||||
|
let nextAlternate = ""
|
||||||
|
while (n != stop)
|
||||||
|
let nextAlternate = <SID>GetNthItemFromList(b:AlternateAllFiles, n)
|
||||||
|
if (nextAlternate == "")
|
||||||
|
let n = 1
|
||||||
|
continue
|
||||||
|
endif
|
||||||
|
let n = n + 1
|
||||||
|
if (<SID>EqualFilePaths(fnamemodify(nextAlternate, ":p"), fnamemodify(currentFile, ":p")))
|
||||||
|
continue
|
||||||
|
endif
|
||||||
|
if (filereadable(nextAlternate))
|
||||||
|
" on cygwin filereadable("foo.H") returns true if "foo.h" exists
|
||||||
|
if (has("unix") && $WINDIR != "" && fnamemodify(nextAlternate, ":p") ==? fnamemodify(currentFile, ":p"))
|
||||||
|
continue
|
||||||
|
endif
|
||||||
|
let foundAlternate = 1
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
endwhile
|
||||||
|
if (foundAlternate == 1)
|
||||||
|
let s:AlternateAllFiles = b:AlternateAllFiles
|
||||||
|
"silent! execute ":e".a:bang." " . nextAlternate
|
||||||
|
call <SID>FindOrCreateBuffer(nextAlternate, "n".a:bang, 0)
|
||||||
|
let b:AlternateAllFiles = s:AlternateAllFiles
|
||||||
|
else
|
||||||
|
echo "Only this alternate file exists"
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
echo "Could not find current file in alternates list"
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
echo "No other alternate files exist"
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
comm! -nargs=? -bang A call AlternateFile("n<bang>", <f-args>)
|
||||||
|
comm! -nargs=? -bang AS call AlternateFile("h<bang>", <f-args>)
|
||||||
|
comm! -nargs=? -bang AV call AlternateFile("v<bang>", <f-args>)
|
||||||
|
comm! -nargs=? -bang AT call AlternateFile("t<bang>", <f-args>)
|
||||||
|
comm! -nargs=? -bang AN call NextAlternate("<bang>")
|
||||||
|
|
||||||
|
" Function : BufferOrFileExists (PRIVATE)
|
||||||
|
" Purpose : determines if a buffer or a readable file exists
|
||||||
|
" Args : fileName (IN) - name of the file to check
|
||||||
|
" Returns : 2 if it exists in memory, 1 if it exists, 0 otherwise
|
||||||
|
" Author : Michael Sharpe <feline@irendi.com>
|
||||||
|
" History : Updated code to handle buffernames using just the
|
||||||
|
" filename and not the path.
|
||||||
|
function! <SID>BufferOrFileExists(fileName)
|
||||||
|
let result = 0
|
||||||
|
|
||||||
|
let lastBuffer = bufnr("$")
|
||||||
|
let i = 1
|
||||||
|
while i <= lastBuffer
|
||||||
|
if <SID>EqualFilePaths(expand("#".i.":p"), a:fileName)
|
||||||
|
let result = 2
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
let i = i + 1
|
||||||
|
endwhile
|
||||||
|
|
||||||
|
if (!result)
|
||||||
|
let bufName = fnamemodify(a:fileName,":t")
|
||||||
|
let memBufName = bufname(bufName)
|
||||||
|
if (memBufName != "")
|
||||||
|
let memBufBasename = fnamemodify(memBufName, ":t")
|
||||||
|
if (bufName == memBufBasename)
|
||||||
|
let result = 2
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if (!result)
|
||||||
|
let result = bufexists(bufName) || bufexists(a:fileName) || filereadable(a:fileName)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if (!result)
|
||||||
|
let result = filereadable(a:fileName)
|
||||||
|
endif
|
||||||
|
return result
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Function : FindOrCreateBuffer (PRIVATE)
|
||||||
|
" Purpose : searches the buffer list (:ls) for the specified filename. If
|
||||||
|
" found, checks the window list for the buffer. If the buffer is in
|
||||||
|
" an already open window, it switches to the window. If the buffer
|
||||||
|
" was not in a window, it switches to that buffer. If the buffer did
|
||||||
|
" not exist, it creates it.
|
||||||
|
" Args : filename (IN) -- the name of the file
|
||||||
|
" doSplit (IN) -- indicates whether the window should be split
|
||||||
|
" ("v", "h", "n", "v!", "h!", "n!", "t", "t!")
|
||||||
|
" findSimilar (IN) -- indicate weather existing buffers should be
|
||||||
|
" prefered
|
||||||
|
" Returns : nothing
|
||||||
|
" Author : Michael Sharpe <feline@irendi.com>
|
||||||
|
" History : + bufname() was not working very well with the possibly strange
|
||||||
|
" paths that can abound with the search path so updated this
|
||||||
|
" slightly. -- Bindu
|
||||||
|
" + updated window switching code to make it more efficient -- Bindu
|
||||||
|
" Allow ! to be applied to buffer/split/editing commands for more
|
||||||
|
" vim/vi like consistency
|
||||||
|
" + implemented fix from Matt Perry
|
||||||
|
function! <SID>FindOrCreateBuffer(fileName, doSplit, findSimilar)
|
||||||
|
" Check to see if the buffer is already open before re-opening it.
|
||||||
|
let FILENAME = escape(a:fileName, ' ')
|
||||||
|
let bufNr = -1
|
||||||
|
let lastBuffer = bufnr("$")
|
||||||
|
let i = 1
|
||||||
|
if (a:findSimilar)
|
||||||
|
while i <= lastBuffer
|
||||||
|
if <SID>EqualFilePaths(expand("#".i.":p"), a:fileName)
|
||||||
|
let bufNr = i
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
let i = i + 1
|
||||||
|
endwhile
|
||||||
|
|
||||||
|
if (bufNr == -1)
|
||||||
|
let bufName = bufname(a:fileName)
|
||||||
|
let bufFilename = fnamemodify(a:fileName,":t")
|
||||||
|
|
||||||
|
if (bufName == "")
|
||||||
|
let bufName = bufname(bufFilename)
|
||||||
|
endif
|
||||||
|
|
||||||
|
if (bufName != "")
|
||||||
|
let tail = fnamemodify(bufName, ":t")
|
||||||
|
if (tail != bufFilename)
|
||||||
|
let bufName = ""
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
if (bufName != "")
|
||||||
|
let bufNr = bufnr(bufName)
|
||||||
|
let FILENAME = bufName
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if (g:alternateRelativeFiles == 1)
|
||||||
|
let FILENAME = fnamemodify(FILENAME, ":p:.")
|
||||||
|
endif
|
||||||
|
|
||||||
|
let splitType = a:doSplit[0]
|
||||||
|
let bang = a:doSplit[1]
|
||||||
|
if (bufNr == -1)
|
||||||
|
" Buffer did not exist....create it
|
||||||
|
let v:errmsg=""
|
||||||
|
if (splitType == "h")
|
||||||
|
silent! execute ":split".bang." " . FILENAME
|
||||||
|
elseif (splitType == "v")
|
||||||
|
silent! execute ":vsplit".bang." " . FILENAME
|
||||||
|
elseif (splitType == "t")
|
||||||
|
silent! execute ":tab split".bang." " . FILENAME
|
||||||
|
else
|
||||||
|
silent! execute ":e".bang." " . FILENAME
|
||||||
|
endif
|
||||||
|
if (v:errmsg != "")
|
||||||
|
echo v:errmsg
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
|
||||||
|
" Find the correct tab corresponding to the existing buffer
|
||||||
|
let tabNr = -1
|
||||||
|
" iterate tab pages
|
||||||
|
for i in range(tabpagenr('$'))
|
||||||
|
" get the list of buffers in the tab
|
||||||
|
let tabList = tabpagebuflist(i + 1)
|
||||||
|
let idx = 0
|
||||||
|
" iterate each buffer in the list
|
||||||
|
while idx < len(tabList)
|
||||||
|
" if it matches the buffer we are looking for...
|
||||||
|
if (tabList[idx] == bufNr)
|
||||||
|
" ... save the number
|
||||||
|
let tabNr = i + 1
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
let idx = idx + 1
|
||||||
|
endwhile
|
||||||
|
if (tabNr != -1)
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
" switch the the tab containing the buffer
|
||||||
|
if (tabNr != -1)
|
||||||
|
execute "tabn ".tabNr
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Buffer was already open......check to see if it is in a window
|
||||||
|
let bufWindow = bufwinnr(bufNr)
|
||||||
|
if (bufWindow == -1)
|
||||||
|
" Buffer was not in a window so open one
|
||||||
|
let v:errmsg=""
|
||||||
|
if (splitType == "h")
|
||||||
|
silent! execute ":sbuffer".bang." " . FILENAME
|
||||||
|
elseif (splitType == "v")
|
||||||
|
silent! execute ":vert sbuffer " . FILENAME
|
||||||
|
elseif (splitType == "t")
|
||||||
|
silent! execute ":tab sbuffer " . FILENAME
|
||||||
|
else
|
||||||
|
silent! execute ":buffer".bang." " . FILENAME
|
||||||
|
endif
|
||||||
|
if (v:errmsg != "")
|
||||||
|
echo v:errmsg
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
" Buffer is already in a window so switch to the window
|
||||||
|
execute bufWindow."wincmd w"
|
||||||
|
if (bufWindow != winnr())
|
||||||
|
" something wierd happened...open the buffer
|
||||||
|
let v:errmsg=""
|
||||||
|
if (splitType == "h")
|
||||||
|
silent! execute ":split".bang." " . FILENAME
|
||||||
|
elseif (splitType == "v")
|
||||||
|
silent! execute ":vsplit".bang." " . FILENAME
|
||||||
|
elseif (splitType == "t")
|
||||||
|
silent! execute ":tab split".bang." " . FILENAME
|
||||||
|
else
|
||||||
|
silent! execute ":e".bang." " . FILENAME
|
||||||
|
endif
|
||||||
|
if (v:errmsg != "")
|
||||||
|
echo v:errmsg
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Function : EqualFilePaths (PRIVATE)
|
||||||
|
" Purpose : Compares two paths. Do simple string comparison anywhere but on
|
||||||
|
" Windows. On Windows take into account that file paths could differ
|
||||||
|
" in usage of separators and the fact that case does not matter.
|
||||||
|
" "c:\WINDOWS" is the same path as "c:/windows". has("win32unix") Vim
|
||||||
|
" version does not count as one having Windows path rules.
|
||||||
|
" Args : path1 (IN) -- first path
|
||||||
|
" path2 (IN) -- second path
|
||||||
|
" Returns : 1 if path1 is equal to path2, 0 otherwise.
|
||||||
|
" Author : Ilya Bobir <ilya@po4ta.com>
|
||||||
|
function! <SID>EqualFilePaths(path1, path2)
|
||||||
|
if has("win16") || has("win32") || has("win64") || has("win95")
|
||||||
|
return substitute(a:path1, "\/", "\\", "g") ==? substitute(a:path2, "\/", "\\", "g")
|
||||||
|
else
|
||||||
|
return a:path1 == a:path2
|
||||||
|
endif
|
||||||
|
endfunction
|
|
@ -0,0 +1,165 @@
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" CSCOPE settings for vim
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
"
|
||||||
|
" This file contains some boilerplate settings for vim's cscope interface,
|
||||||
|
" plus some keyboard mappings that I've found useful.
|
||||||
|
"
|
||||||
|
" USAGE:
|
||||||
|
" -- vim 6: Stick this file in your ~/.vim/plugin directory (or in a
|
||||||
|
" 'plugin' directory in some other directory that is in your
|
||||||
|
" 'runtimepath'.
|
||||||
|
"
|
||||||
|
" -- vim 5: Stick this file somewhere and 'source cscope.vim' it from
|
||||||
|
" your ~/.vimrc file (or cut and paste it into your .vimrc).
|
||||||
|
"
|
||||||
|
" NOTE:
|
||||||
|
" These key maps use multiple keystrokes (2 or 3 keys). If you find that vim
|
||||||
|
" keeps timing you out before you can complete them, try changing your timeout
|
||||||
|
" settings, as explained below.
|
||||||
|
"
|
||||||
|
" Happy cscoping,
|
||||||
|
"
|
||||||
|
" Jason Duell jduell@alumni.princeton.edu 2002/3/7
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
|
||||||
|
" This tests to see if vim was configured with the '--enable-cscope' option
|
||||||
|
" when it was compiled. If it wasn't, time to recompile vim...
|
||||||
|
if has("cscope")
|
||||||
|
|
||||||
|
""""""""""""" Standard cscope/vim boilerplate
|
||||||
|
|
||||||
|
" use both cscope and ctag for 'ctrl-]', ':ta', and 'vim -t'
|
||||||
|
set cscopetag
|
||||||
|
|
||||||
|
" check cscope for definition of a symbol before checking ctags: set to 1
|
||||||
|
" if you want the reverse search order.
|
||||||
|
set csto=0
|
||||||
|
|
||||||
|
" add any cscope database in current directory
|
||||||
|
if filereadable("cscope.out")
|
||||||
|
cs add cscope.out
|
||||||
|
" else add the database pointed to by environment variable
|
||||||
|
elseif $CSCOPE_DB != ""
|
||||||
|
cs add $CSCOPE_DB
|
||||||
|
endif
|
||||||
|
|
||||||
|
" show msg when any other cscope db added
|
||||||
|
set cscopeverbose
|
||||||
|
|
||||||
|
|
||||||
|
""""""""""""" My cscope/vim key mappings
|
||||||
|
"
|
||||||
|
" The following maps all invoke one of the following cscope search types:
|
||||||
|
"
|
||||||
|
" 's' symbol: find all references to the token under cursor
|
||||||
|
" 'g' global: find global definition(s) of the token under cursor
|
||||||
|
" 'c' calls: find all calls to the function name under cursor
|
||||||
|
" 't' text: find all instances of the text under cursor
|
||||||
|
" 'e' egrep: egrep search for the word under cursor
|
||||||
|
" 'f' file: open the filename under cursor
|
||||||
|
" 'i' includes: find files that include the filename under cursor
|
||||||
|
" 'd' called: find functions that function under cursor calls
|
||||||
|
"
|
||||||
|
" Below are three sets of the maps: one set that just jumps to your
|
||||||
|
" search result, one that splits the existing vim window horizontally and
|
||||||
|
" diplays your search result in the new window, and one that does the same
|
||||||
|
" thing, but does a vertical split instead (vim 6 only).
|
||||||
|
"
|
||||||
|
" I've used CTRL-\ and CTRL-@ as the starting keys for these maps, as it's
|
||||||
|
" unlikely that you need their default mappings (CTRL-\'s default use is
|
||||||
|
" as part of CTRL-\ CTRL-N typemap, which basically just does the same
|
||||||
|
" thing as hitting 'escape': CTRL-@ doesn't seem to have any default use).
|
||||||
|
" If you don't like using 'CTRL-@' or CTRL-\, , you can change some or all
|
||||||
|
" of these maps to use other keys. One likely candidate is 'CTRL-_'
|
||||||
|
" (which also maps to CTRL-/, which is easier to type). By default it is
|
||||||
|
" used to switch between Hebrew and English keyboard mode.
|
||||||
|
"
|
||||||
|
" All of the maps involving the <cfile> macro use '^<cfile>$': this is so
|
||||||
|
" that searches over '#include <time.h>" return only references to
|
||||||
|
" 'time.h', and not 'sys/time.h', etc. (by default cscope will return all
|
||||||
|
" files that contain 'time.h' as part of their name).
|
||||||
|
|
||||||
|
|
||||||
|
" To do the first type of search, hit 'CTRL-\', followed by one of the
|
||||||
|
" cscope search types above (s,g,c,t,e,f,i,d). The result of your cscope
|
||||||
|
" search will be displayed in the current window. You can use CTRL-T to
|
||||||
|
" go back to where you were before the search.
|
||||||
|
"
|
||||||
|
|
||||||
|
nmap <C-\>s :cs find s <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
nmap <C-\>g :cs find g <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
nmap <C-\>c :cs find c <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
nmap <C-\>t :cs find t <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
nmap <C-\>e :cs find e <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
nmap <C-\>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
|
||||||
|
nmap <C-\>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
|
||||||
|
nmap <C-\>d :cs find d <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
|
||||||
|
|
||||||
|
" Using 'CTRL-spacebar' (intepreted as CTRL-@ by vim) then a search type
|
||||||
|
" makes the vim window split horizontally, with search result displayed in
|
||||||
|
" the new window.
|
||||||
|
"
|
||||||
|
" (Note: earlier versions of vim may not have the :scs command, but it
|
||||||
|
" can be simulated roughly via:
|
||||||
|
" nmap <C-@>s <C-W><C-S> :cs find s <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
|
||||||
|
nmap <C-@>s :scs find s <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
nmap <C-@>g :scs find g <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
nmap <C-@>c :scs find c <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
nmap <C-@>t :scs find t <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
nmap <C-@>e :scs find e <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
nmap <C-@>f :scs find f <C-R>=expand("<cfile>")<CR><CR>
|
||||||
|
nmap <C-@>i :scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
|
||||||
|
nmap <C-@>d :scs find d <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
|
||||||
|
|
||||||
|
" Hitting CTRL-space *twice* before the search type does a vertical
|
||||||
|
" split instead of a horizontal one (vim 6 and up only)
|
||||||
|
"
|
||||||
|
" (Note: you may wish to put a 'set splitright' in your .vimrc
|
||||||
|
" if you prefer the new window on the right instead of the left
|
||||||
|
|
||||||
|
nmap <C-@><C-@>s :vert scs find s <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
nmap <C-@><C-@>g :vert scs find g <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
nmap <C-@><C-@>c :vert scs find c <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
nmap <C-@><C-@>t :vert scs find t <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
nmap <C-@><C-@>e :vert scs find e <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
nmap <C-@><C-@>f :vert scs find f <C-R>=expand("<cfile>")<CR><CR>
|
||||||
|
nmap <C-@><C-@>i :vert scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
|
||||||
|
nmap <C-@><C-@>d :vert scs find d <C-R>=expand("<cword>")<CR><CR>
|
||||||
|
|
||||||
|
|
||||||
|
""""""""""""" key map timeouts
|
||||||
|
"
|
||||||
|
" By default Vim will only wait 1 second for each keystroke in a mapping.
|
||||||
|
" You may find that too short with the above typemaps. If so, you should
|
||||||
|
" either turn off mapping timeouts via 'notimeout'.
|
||||||
|
"
|
||||||
|
"set notimeout
|
||||||
|
"
|
||||||
|
" Or, you can keep timeouts, by uncommenting the timeoutlen line below,
|
||||||
|
" with your own personal favorite value (in milliseconds):
|
||||||
|
"
|
||||||
|
"set timeoutlen=4000
|
||||||
|
"
|
||||||
|
" Either way, since mapping timeout settings by default also set the
|
||||||
|
" timeouts for multicharacter 'keys codes' (like <F1>), you should also
|
||||||
|
" set ttimeout and ttimeoutlen: otherwise, you will experience strange
|
||||||
|
" delays as vim waits for a keystroke after you hit ESC (it will be
|
||||||
|
" waiting to see if the ESC is actually part of a key code like <F1>).
|
||||||
|
"
|
||||||
|
"set ttimeout
|
||||||
|
"
|
||||||
|
" personally, I find a tenth of a second to work well for key code
|
||||||
|
" timeouts. If you experience problems and have a slow terminal or network
|
||||||
|
" connection, set it higher. If you don't set ttimeoutlen, the value for
|
||||||
|
" timeoutlent (default: 1000 = 1 second, which is sluggish) is used.
|
||||||
|
"
|
||||||
|
"set ttimeoutlen=100
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,158 @@
|
||||||
|
"=============================================================================
|
||||||
|
" Copyright (c) 2007-2010 Takeshi NISHIDA
|
||||||
|
"
|
||||||
|
" GetLatestVimScripts: 1984 1 :AutoInstall: FuzzyFinder
|
||||||
|
"=============================================================================
|
||||||
|
" LOAD GUARD {{{1
|
||||||
|
|
||||||
|
try
|
||||||
|
if !l9#guardScriptLoading(expand('<sfile>:p'), 702, 101, [])
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
catch /E117/
|
||||||
|
echoerr '***** L9 library must be installed! *****'
|
||||||
|
finish
|
||||||
|
endtry
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" LOCAL FUNCTIONS {{{1
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:initialize()
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_modesDisable' , [ 'mrufile', 'mrucmd', ])
|
||||||
|
call l9#defineVariableDefault('g:fuf_keyOpen' , '<CR>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_keyOpenSplit' , '<C-j>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_keyOpenVsplit' , '<C-k>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_keyOpenTabpage' , '<C-l>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_keyPreview' , '<C-@>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_keyNextMode' , '<C-t>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_keyPrevMode' , '<C-y>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_keyPrevPattern' , '<C-s>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_keyNextPattern' , '<C-_>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_keySwitchMatching', '<C-\><C-\>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_dataDir' , '~/.vim-fuf-data')
|
||||||
|
call l9#defineVariableDefault('g:fuf_abbrevMap' , {})
|
||||||
|
call l9#defineVariableDefault('g:fuf_patternSeparator' , ';')
|
||||||
|
call l9#defineVariableDefault('g:fuf_promptHighlight' , 'Question')
|
||||||
|
call l9#defineVariableDefault('g:fuf_ignoreCase' , 1)
|
||||||
|
call l9#defineVariableDefault('g:fuf_splitPathMatching', 1)
|
||||||
|
call l9#defineVariableDefault('g:fuf_fuzzyRefining' , 0)
|
||||||
|
call l9#defineVariableDefault('g:fuf_smartBs' , 1)
|
||||||
|
call l9#defineVariableDefault('g:fuf_reuseWindow' , 1)
|
||||||
|
call l9#defineVariableDefault('g:fuf_timeFormat' , '(%Y-%m-%d %H:%M:%S)')
|
||||||
|
call l9#defineVariableDefault('g:fuf_learningLimit' , 100)
|
||||||
|
call l9#defineVariableDefault('g:fuf_enumeratingLimit' , 50)
|
||||||
|
call l9#defineVariableDefault('g:fuf_maxMenuWidth' , 78)
|
||||||
|
call l9#defineVariableDefault('g:fuf_previewHeight' , 0)
|
||||||
|
call l9#defineVariableDefault('g:fuf_autoPreview' , 0)
|
||||||
|
call l9#defineVariableDefault('g:fuf_useMigemo' , 0)
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffer_prompt' , '>Buffer[]>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffer_switchOrder', 10)
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffer_mruOrder' , 1)
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffer_keyDelete' , '<C-]>')
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_file_prompt' , '>File[]>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_file_switchOrder', 20)
|
||||||
|
call l9#defineVariableDefault('g:fuf_file_exclude' , '\v\~$|\.(o|exe|dll|bak|orig|sw[po])$|(^|[/\\])\.(hg|git|bzr)($|[/\\])')
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_coveragefile_prompt' , '>CoverageFile[]>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_coveragefile_switchOrder', 30)
|
||||||
|
call l9#defineVariableDefault('g:fuf_coveragefile_exclude' , '\v\~$|\.(o|exe|dll|bak|orig|sw[po])$|(^|[/\\])\.(hg|git|bzr)($|[/\\])')
|
||||||
|
call l9#defineVariableDefault('g:fuf_coveragefile_globPatterns', ['**/.*', '**/*'])
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_dir_prompt' , '>Dir[]>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_dir_switchOrder', 40)
|
||||||
|
call l9#defineVariableDefault('g:fuf_dir_exclude' , '\v(^|[/\\])\.(hg|git|bzr)($|[/\\])')
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_mrufile_prompt' , '>MRU-File[]>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_mrufile_switchOrder', 50)
|
||||||
|
call l9#defineVariableDefault('g:fuf_mrufile_exclude' , '\v\~$|\.(o|exe|dll|bak|orig|sw[po])$|^(\/\/|\\\\|\/mnt\/|\/media\/)')
|
||||||
|
call l9#defineVariableDefault('g:fuf_mrufile_maxItem' , 200)
|
||||||
|
call l9#defineVariableDefault('g:fuf_mrufile_maxItemDir' , 50)
|
||||||
|
call l9#defineVariableDefault('g:fuf_mrufile_keyExpand' , '<C-]>')
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_mrucmd_prompt' , '>MRU-Cmd[]>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_mrucmd_switchOrder', 60)
|
||||||
|
call l9#defineVariableDefault('g:fuf_mrucmd_exclude' , '^$')
|
||||||
|
call l9#defineVariableDefault('g:fuf_mrucmd_maxItem' , 200)
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_bookmarkfile_prompt' , '>Bookmark-File[]>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_bookmarkfile_switchOrder', 70)
|
||||||
|
call l9#defineVariableDefault('g:fuf_bookmarkfile_searchRange', 400)
|
||||||
|
call l9#defineVariableDefault('g:fuf_bookmarkfile_keyDelete' , '<C-]>')
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_bookmarkdir_prompt' , '>Bookmark-Dir[]>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_bookmarkdir_switchOrder', 80)
|
||||||
|
call l9#defineVariableDefault('g:fuf_bookmarkdir_keyDelete' , '<C-]>')
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_tag_prompt' , '>Tag[]>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_tag_switchOrder', 90)
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag_prompt' , '>Buffer-Tag[]>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag_switchOrder', 100)
|
||||||
|
call l9#defineVariableDefault('g:fuf_buffertag_ctagsPath' , 'ctags')
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_taggedfile_prompt' , '>Tagged-File[]>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_taggedfile_switchOrder', 110)
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_jumplist_prompt' , '>Jump-List[]>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_jumplist_switchOrder', 120)
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_changelist_prompt' , '>Change-List[]>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_changelist_switchOrder', 130)
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_quickfix_prompt' , '>Quickfix[]>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_quickfix_switchOrder', 140)
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_line_prompt' , '>Line[]>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_line_switchOrder', 150)
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call l9#defineVariableDefault('g:fuf_help_prompt' , '>Help[]>')
|
||||||
|
call l9#defineVariableDefault('g:fuf_help_switchOrder', 160)
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
command! -bang -narg=0 FufEditDataFile call fuf#editDataFile()
|
||||||
|
command! -bang -narg=0 FufRenewCache call s:renewCachesOfAllModes()
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
call fuf#addMode('buffer')
|
||||||
|
call fuf#addMode('file')
|
||||||
|
call fuf#addMode('coveragefile')
|
||||||
|
call fuf#addMode('dir')
|
||||||
|
call fuf#addMode('mrufile')
|
||||||
|
call fuf#addMode('mrucmd')
|
||||||
|
call fuf#addMode('bookmarkfile')
|
||||||
|
call fuf#addMode('bookmarkdir')
|
||||||
|
call fuf#addMode('tag')
|
||||||
|
call fuf#addMode('buffertag')
|
||||||
|
call fuf#addMode('taggedfile')
|
||||||
|
call fuf#addMode('jumplist')
|
||||||
|
call fuf#addMode('changelist')
|
||||||
|
call fuf#addMode('quickfix')
|
||||||
|
call fuf#addMode('line')
|
||||||
|
call fuf#addMode('help')
|
||||||
|
call fuf#addMode('givenfile')
|
||||||
|
call fuf#addMode('givendir')
|
||||||
|
call fuf#addMode('givencmd')
|
||||||
|
call fuf#addMode('callbackfile')
|
||||||
|
call fuf#addMode('callbackitem')
|
||||||
|
"---------------------------------------------------------------------------
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
"
|
||||||
|
function s:renewCachesOfAllModes()
|
||||||
|
for m in fuf#getModeNames()
|
||||||
|
call fuf#{m}#renewCache()
|
||||||
|
endfor
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" INITIALIZATION {{{1
|
||||||
|
|
||||||
|
call s:initialize()
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
"=============================================================================
|
||||||
|
" vim: set fdm=marker:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,135 @@
|
||||||
|
" Vim syntax file
|
||||||
|
" Language: po (gettext)
|
||||||
|
" Maintainer: Dwayne Bailey <dwayne@translate.org.za>
|
||||||
|
" Last Change: 2008 Jan 08
|
||||||
|
" Contributors: Dwayne Bailey (Most advanced syntax highlighting)
|
||||||
|
" Leonardo Fontenelle (Spell checking)
|
||||||
|
" Nam SungHyun <namsh@kldp.org> (Original maintainer)
|
||||||
|
|
||||||
|
" For version 5.x: Clear all syntax items
|
||||||
|
" For version 6.x: Quit when a syntax file was already loaded
|
||||||
|
if version < 600
|
||||||
|
syntax clear
|
||||||
|
elseif exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
syn sync minlines=10
|
||||||
|
|
||||||
|
" Identifiers
|
||||||
|
syn match poStatementMsgCTxt "^msgctxt"
|
||||||
|
syn match poStatementMsgidplural "^msgid_plural" contained
|
||||||
|
syn match poPluralCaseN "[0-9]" contained
|
||||||
|
syn match poStatementMsgstr "^msgstr\(\[[0-9]\]\)" contains=poPluralCaseN
|
||||||
|
|
||||||
|
" Simple HTML and XML highlighting
|
||||||
|
syn match poHtml "<\_[^<>]\+>" contains=poHtmlTranslatables,poLineBreak
|
||||||
|
syn match poHtmlNot +"<[^<]\+>"+ms=s+1,me=e-1
|
||||||
|
syn region poHtmlTranslatables start=+\(abbr\|alt\|content\|summary\|standby\|title\)=\\"+ms=e-1 end=+\\"+ contained contains=@Spell
|
||||||
|
syn match poLineBreak +"\n"+ contained
|
||||||
|
|
||||||
|
" Translation blocks
|
||||||
|
syn region poMsgCTxt matchgroup=poStatementMsgCTxt start=+^msgctxt "+rs=e-1 matchgroup=poStringCTxt end=+^msgid "+me=s-1 contains=poStringCTxt
|
||||||
|
syn region poMsgID matchgroup=poStatementMsgid start=+^msgid "+rs=e-1 matchgroup=poStringID end=+^msgstr\(\|\[[\]0\[]\]\) "+me=s-1 contains=poStringID,poStatementMsgidplural,poStatementMsgid
|
||||||
|
syn region poMsgSTR matchgroup=poStatementMsgstr start=+^msgstr\(\|\[[\]0\[]\]\) "+rs=e-1 matchgroup=poStringSTR end=+\n\n+me=s-1 contains=poStringSTR,poStatementMsgstr
|
||||||
|
syn region poStringCTxt start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||||
|
syn region poStringID start=+"+ skip=+\\\\\|\\"+ end=+"+ contained
|
||||||
|
\ contains=poSpecial,poFormat,poCommentKDE,poPluralKDE,poKDEdesktopFile,poHtml,poAcceleratorId,poHtmlNot,poVariable
|
||||||
|
syn region poStringSTR start=+"+ skip=+\\\\\|\\"+ end=+"+ contained
|
||||||
|
\ contains=@Spell,poSpecial,poFormat,poHeaderItem,poCommentKDEError,poHeaderUndefined,poPluralKDEError,poMsguniqError,poKDEdesktopFile,poHtml,poAcceleratorStr,poHtmlNot,poVariable
|
||||||
|
|
||||||
|
" Header and Copyright
|
||||||
|
syn match poHeaderItem "\(Project-Id-Version\|Report-Msgid-Bugs-To\|POT-Creation-Date\|PO-Revision-Date\|Last-Translator\|Language-Team\|MIME-Version\|Content-Type\|Content-Transfer-Encoding\|Plural-Forms\|X-Generator\): " contained
|
||||||
|
syn match poHeaderUndefined "\(PACKAGE VERSION\|YEAR-MO-DA HO:MI+ZONE\|FULL NAME <EMAIL@ADDRESS>\|LANGUAGE <LL@li.org>\|CHARSET\|ENCODING\|INTEGER\|EXPRESSION\)" contained
|
||||||
|
syn match poCopyrightUnset "SOME DESCRIPTIVE TITLE\|FIRST AUTHOR <EMAIL@ADDRESS>, YEAR\|Copyright (C) YEAR Free Software Foundation, Inc\|YEAR THE PACKAGE\'S COPYRIGHT HOLDER\|PACKAGE" contained
|
||||||
|
|
||||||
|
" Translation comment block including: translator comment, automatic coments, flags and locations
|
||||||
|
syn match poComment "^#.*$"
|
||||||
|
syn keyword poFlagFuzzy fuzzy contained
|
||||||
|
syn match poCommentTranslator "^# .*$" contains=poCopyrightUnset
|
||||||
|
syn match poCommentAutomatic "^#\..*$"
|
||||||
|
syn match poCommentSources "^#:.*$"
|
||||||
|
syn match poCommentFlags "^#,.*$" contains=poFlagFuzzy
|
||||||
|
|
||||||
|
" Translations (also includes header fields as they appear in a translation msgstr)
|
||||||
|
syn region poCommentKDE start=+"_: +ms=s+1 end="\\n" end="\"\n^msgstr"me=s-1 contained
|
||||||
|
syn region poCommentKDEError start=+"\(\|\s\+\)_:+ms=s+1 end="\\n" end=+"\n\n+me=s-1 contained
|
||||||
|
syn match poPluralKDE +"_n: +ms=s+1 contained
|
||||||
|
syn region poPluralKDEError start=+"\(\|\s\+\)_n:+ms=s+1 end="\"\n\n"me=s-1 contained
|
||||||
|
syn match poSpecial contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
|
||||||
|
syn match poFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([diuoxXfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
|
||||||
|
syn match poFormat "%%" contained
|
||||||
|
|
||||||
|
" msguniq and msgcat conflicts
|
||||||
|
syn region poMsguniqError matchgroup=poMsguniqErrorMarkers start="#-#-#-#-#" end='#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)\\n' contained
|
||||||
|
|
||||||
|
" Obsolete messages
|
||||||
|
syn match poObsolete "^#\~.*$"
|
||||||
|
|
||||||
|
" KDE Name= handling
|
||||||
|
syn match poKDEdesktopFile "\"\(Name\|Comment\|GenericName\|Description\|Keywords\|About\)="ms=s+1,me=e-1
|
||||||
|
|
||||||
|
" Accelerator keys - this messes up if the preceding or following char is a multibyte unicode char
|
||||||
|
syn match poAcceleratorId contained "[^&_~][&_~]\(\a\|\d\)[^:]"ms=s+1,me=e-1
|
||||||
|
syn match poAcceleratorStr contained "[^&_~][&_~]\(\a\|\d\)[^:]"ms=s+1,me=e-1 contains=@Spell
|
||||||
|
|
||||||
|
" Variables simple
|
||||||
|
syn match poVariable contained "%\d"
|
||||||
|
|
||||||
|
" Define the default highlighting.
|
||||||
|
" For version 5.7 and earlier: only when not done already
|
||||||
|
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||||
|
if version >= 508 || !exists("did_po_syn_inits")
|
||||||
|
if version < 508
|
||||||
|
let did_po_syn_inits = 1
|
||||||
|
command -nargs=+ HiLink hi link <args>
|
||||||
|
else
|
||||||
|
command -nargs=+ HiLink hi def link <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
HiLink poCommentSources PreProc
|
||||||
|
HiLink poComment Comment
|
||||||
|
HiLink poCommentAutomatic Comment
|
||||||
|
HiLink poCommentTranslator Comment
|
||||||
|
HiLink poCommentFlags Special
|
||||||
|
HiLink poCopyrightUnset Todo
|
||||||
|
HiLink poFlagFuzzy Todo
|
||||||
|
HiLink poObsolete Comment
|
||||||
|
|
||||||
|
HiLink poStatementMsgid Statement
|
||||||
|
HiLink poStatementMsgstr Statement
|
||||||
|
HiLink poStatementMsgidplural Statement
|
||||||
|
HiLink poStatementMsgCTxt Statement
|
||||||
|
HiLink poPluralCaseN Constant
|
||||||
|
|
||||||
|
HiLink poStringCTxt Comment
|
||||||
|
HiLink poStringID String
|
||||||
|
HiLink poStringSTR String
|
||||||
|
HiLink poCommentKDE Comment
|
||||||
|
HiLink poCommentKDEError Error
|
||||||
|
HiLink poPluralKDE Comment
|
||||||
|
HiLink poPluralKDEError Error
|
||||||
|
HiLink poHeaderItem Identifier
|
||||||
|
HiLink poHeaderUndefined Todo
|
||||||
|
HiLink poKDEdesktopFile Identifier
|
||||||
|
|
||||||
|
HiLink poHtml Identifier
|
||||||
|
HiLink poHtmlNot String
|
||||||
|
HiLink poHtmlTranslatables String
|
||||||
|
HiLink poLineBreak String
|
||||||
|
|
||||||
|
HiLink poFormat poSpecial
|
||||||
|
HiLink poSpecial Special
|
||||||
|
HiLink poAcceleratorId Special
|
||||||
|
HiLink poAcceleratorStr Special
|
||||||
|
HiLink poVariable Special
|
||||||
|
|
||||||
|
HiLink poMsguniqError Special
|
||||||
|
HiLink poMsguniqErrorMarkers Comment
|
||||||
|
|
||||||
|
delcommand HiLink
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:current_syntax = "po"
|
||||||
|
|
||||||
|
" vim:set ts=8 sts=2 sw=2 noet:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,88 @@
|
||||||
|
let s:tree_up_dir_line = '.. (up a dir)'
|
||||||
|
"NERDTreeFlags are syntax items that should be invisible, but give clues as to
|
||||||
|
"how things should be highlighted
|
||||||
|
syn match NERDTreeFlag #\~#
|
||||||
|
syn match NERDTreeFlag #\[RO\]#
|
||||||
|
|
||||||
|
"highlighting for the .. (up dir) line at the top of the tree
|
||||||
|
execute "syn match NERDTreeUp #\\V". s:tree_up_dir_line ."#"
|
||||||
|
|
||||||
|
"highlighting for the ~/+ symbols for the directory nodes
|
||||||
|
syn match NERDTreeClosable #\~\<#
|
||||||
|
syn match NERDTreeClosable #\~\.#
|
||||||
|
syn match NERDTreeOpenable #+\<#
|
||||||
|
syn match NERDTreeOpenable #+\.#he=e-1
|
||||||
|
|
||||||
|
"highlighting for the tree structural parts
|
||||||
|
syn match NERDTreePart #|#
|
||||||
|
syn match NERDTreePart #`#
|
||||||
|
syn match NERDTreePartFile #[|`]-#hs=s+1 contains=NERDTreePart
|
||||||
|
|
||||||
|
"quickhelp syntax elements
|
||||||
|
syn match NERDTreeHelpKey #" \{1,2\}[^ ]*:#hs=s+2,he=e-1
|
||||||
|
syn match NERDTreeHelpKey #" \{1,2\}[^ ]*,#hs=s+2,he=e-1
|
||||||
|
syn match NERDTreeHelpTitle #" .*\~#hs=s+2,he=e-1 contains=NERDTreeFlag
|
||||||
|
syn match NERDTreeToggleOn #".*(on)#hs=e-2,he=e-1 contains=NERDTreeHelpKey
|
||||||
|
syn match NERDTreeToggleOff #".*(off)#hs=e-3,he=e-1 contains=NERDTreeHelpKey
|
||||||
|
syn match NERDTreeHelpCommand #" :.\{-}\>#hs=s+3
|
||||||
|
syn match NERDTreeHelp #^".*# contains=NERDTreeHelpKey,NERDTreeHelpTitle,NERDTreeFlag,NERDTreeToggleOff,NERDTreeToggleOn,NERDTreeHelpCommand
|
||||||
|
|
||||||
|
"highlighting for readonly files
|
||||||
|
syn match NERDTreeRO #.*\[RO\]#hs=s+2 contains=NERDTreeFlag,NERDTreeBookmark,NERDTreePart,NERDTreePartFile
|
||||||
|
|
||||||
|
"highlighting for sym links
|
||||||
|
syn match NERDTreeLink #[^-| `].* -> # contains=NERDTreeBookmark,NERDTreeOpenable,NERDTreeClosable,NERDTreeDirSlash
|
||||||
|
|
||||||
|
"highlighing for directory nodes and file nodes
|
||||||
|
syn match NERDTreeDirSlash #/#
|
||||||
|
syn match NERDTreeDir #[^-| `].*/# contains=NERDTreeLink,NERDTreeDirSlash,NERDTreeOpenable,NERDTreeClosable
|
||||||
|
syn match NERDTreeExecFile #[|` ].*\*\($\| \)# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark
|
||||||
|
syn match NERDTreeFile #|-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
|
||||||
|
syn match NERDTreeFile #`-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
|
||||||
|
syn match NERDTreeCWD #^[</].*$#
|
||||||
|
|
||||||
|
"highlighting for bookmarks
|
||||||
|
syn match NERDTreeBookmark # {.*}#hs=s+1
|
||||||
|
|
||||||
|
"highlighting for the bookmarks table
|
||||||
|
syn match NERDTreeBookmarksLeader #^>#
|
||||||
|
syn match NERDTreeBookmarksHeader #^>-\+Bookmarks-\+$# contains=NERDTreeBookmarksLeader
|
||||||
|
syn match NERDTreeBookmarkName #^>.\{-} #he=e-1 contains=NERDTreeBookmarksLeader
|
||||||
|
syn match NERDTreeBookmark #^>.*$# contains=NERDTreeBookmarksLeader,NERDTreeBookmarkName,NERDTreeBookmarksHeader
|
||||||
|
|
||||||
|
if exists("g:NERDChristmasTree") && g:NERDChristmasTree
|
||||||
|
hi def link NERDTreePart Special
|
||||||
|
hi def link NERDTreePartFile Type
|
||||||
|
hi def link NERDTreeFile Normal
|
||||||
|
hi def link NERDTreeExecFile Title
|
||||||
|
hi def link NERDTreeDirSlash Identifier
|
||||||
|
hi def link NERDTreeClosable Type
|
||||||
|
else
|
||||||
|
hi def link NERDTreePart Normal
|
||||||
|
hi def link NERDTreePartFile Normal
|
||||||
|
hi def link NERDTreeFile Normal
|
||||||
|
hi def link NERDTreeClosable Title
|
||||||
|
endif
|
||||||
|
|
||||||
|
hi def link NERDTreeBookmarksHeader statement
|
||||||
|
hi def link NERDTreeBookmarksLeader ignore
|
||||||
|
hi def link NERDTreeBookmarkName Identifier
|
||||||
|
hi def link NERDTreeBookmark normal
|
||||||
|
|
||||||
|
hi def link NERDTreeHelp String
|
||||||
|
hi def link NERDTreeHelpKey Identifier
|
||||||
|
hi def link NERDTreeHelpCommand Identifier
|
||||||
|
hi def link NERDTreeHelpTitle Macro
|
||||||
|
hi def link NERDTreeToggleOn Question
|
||||||
|
hi def link NERDTreeToggleOff WarningMsg
|
||||||
|
|
||||||
|
hi def link NERDTreeDir Directory
|
||||||
|
hi def link NERDTreeUp Directory
|
||||||
|
hi def link NERDTreeCWD Statement
|
||||||
|
hi def link NERDTreeLink Macro
|
||||||
|
hi def link NERDTreeOpenable Title
|
||||||
|
hi def link NERDTreeFlag ignore
|
||||||
|
hi def link NERDTreeRO WarningMsg
|
||||||
|
hi def link NERDTreeBookmark Statement
|
||||||
|
|
||||||
|
hi def link NERDTreeCurrentNode Search
|
|
@ -5,3 +5,9 @@ source! /home/kolan/.vimperatorrc.local
|
||||||
" vim: set ft=vimperator:
|
" vim: set ft=vimperator:
|
||||||
map <C-S-p> :tabm -1<CR>
|
map <C-S-p> :tabm -1<CR>
|
||||||
map <C-S-n> :tabm +1<CR>
|
map <C-S-n> :tabm +1<CR>
|
||||||
|
|
||||||
|
" Valadoc.org: disable 'new window' in 'edit mode'
|
||||||
|
:imap <C-n> <Esc>gt<Esc>
|
||||||
|
:imap <C-S-n> <Esc>gt<Esc>
|
||||||
|
:imap <C-p> <Esc>gT<Esc>
|
||||||
|
:imap <C-S-p> <Esc>gT<Esc>
|
||||||
|
|
212
.vimrc
212
.vimrc
|
@ -2,22 +2,73 @@
|
||||||
|
|
||||||
" общие настройки
|
" общие настройки
|
||||||
syntax on " включить подсветку синтаксиса
|
syntax on " включить подсветку синтаксиса
|
||||||
set ts=8 " у меня табуляция (tabstop) 4 символа
|
set ts=4 " у меня табуляция (tabstop) 4 символа
|
||||||
set tabstop=8
|
set tabstop=4
|
||||||
set shiftwidth=8
|
set shiftwidth=4
|
||||||
set textwidth=8
|
set textwidth=79
|
||||||
set autoindent
|
|
||||||
set tw=159
|
set tw=159
|
||||||
set copyindent
|
set colorcolumn=80,120,160
|
||||||
"set expandtab
|
"set expandtab
|
||||||
set background=dark " весьма важная штука! :)
|
set autoindent
|
||||||
|
set copyindent
|
||||||
|
"set background=dark " весьма важная штука! :)
|
||||||
set lbr
|
set lbr
|
||||||
set showcmd
|
set showcmd
|
||||||
set nocompatible " обойдёмся без стандартного vi
|
set nocompatible " обойдёмся без стандартного vi
|
||||||
set backspace=indent,eol,start
|
set backspace=indent,eol,start
|
||||||
color desert
|
set nofixendofline
|
||||||
|
colorscheme default
|
||||||
|
hi DiffAdd ctermfg=white
|
||||||
|
hi DiffChange ctermfg=white
|
||||||
|
hi DiffDelete ctermfg=white
|
||||||
|
hi DiffText ctermfg=white
|
||||||
set number
|
set number
|
||||||
nmap <F6> :set invlist<cr>
|
nmap <F6> :set invlist<cr>
|
||||||
|
" set breakindent " https://www.linux.org.ru/forum/general/10615635?lastmod=1403800233259
|
||||||
|
|
||||||
|
" https://ru.wikibooks.org/wiki/Vim#%D0%A1%D0%BF%D0%BE%D1%81%D0%BE%D0%B1_2
|
||||||
|
set langmap=ёйцукенгшщзхъфывапролджэячсмитьбю;`qwertyuiop[]asdfghjkl\\;'zxcvbnm\\,.,ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ;QWERTYUIOP{}ASDFGHJKL:\\"ZXCVBNM<>
|
||||||
|
|
||||||
|
" Setup for the GNU coding format standard
|
||||||
|
function! GnuIndent()
|
||||||
|
setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1
|
||||||
|
setlocal shiftwidth=2
|
||||||
|
setlocal tabstop=4
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Setup for the CPP coding format standard
|
||||||
|
function! CppIndent()
|
||||||
|
setlocal shiftwidth=2
|
||||||
|
setlocal tabstop=2
|
||||||
|
setlocal expandtab
|
||||||
|
set textwidth=119
|
||||||
|
set tw=119
|
||||||
|
set colorcolumn=120,160
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Setup for the Sh coding format standard
|
||||||
|
function! ShIndent()
|
||||||
|
setlocal shiftwidth=4
|
||||||
|
setlocal tabstop=4
|
||||||
|
setlocal noexpandtab
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Setup for the Vala coding format standard
|
||||||
|
function! ValaIndent()
|
||||||
|
setlocal shiftwidth=4
|
||||||
|
setlocal tabstop=4
|
||||||
|
setlocal noexpandtab
|
||||||
|
set textwidth=119
|
||||||
|
set tw=119
|
||||||
|
set colorcolumn=120,160
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
hi ColorColumn ctermbg=lightgrey guibg=lightgrey
|
||||||
|
|
||||||
|
au FileType c call GnuIndent()
|
||||||
|
au FileType cpp call CppIndent()
|
||||||
|
au FileType vala,vapi call ValaIndent()
|
||||||
|
au FileType sh call ShIndent()
|
||||||
|
|
||||||
" отключение бэкапов
|
" отключение бэкапов
|
||||||
set nobackup
|
set nobackup
|
||||||
|
@ -49,8 +100,8 @@ endfunction
|
||||||
au BufWritePost * call ModeChange()
|
au BufWritePost * call ModeChange()
|
||||||
|
|
||||||
" интуитивные горячие клавиши =)
|
" интуитивные горячие клавиши =)
|
||||||
imap <F11> <Esc>:set<Space>nu!<CR>a
|
imap <F3> <Esc>:set<Space>nu!<CR>a
|
||||||
nmap <F11> :set<Space>nu!<CR>
|
nmap <F3> :set<Space>nu!<CR>
|
||||||
nmap <F2> :w<cr>
|
nmap <F2> :w<cr>
|
||||||
vmap <F2> <esc>:w<cr>i
|
vmap <F2> <esc>:w<cr>i
|
||||||
imap <F2> <esc>:w<cr>i
|
imap <F2> <esc>:w<cr>i
|
||||||
|
@ -62,12 +113,12 @@ imap <F10> <esc>:q!<cr>i
|
||||||
:set tabpagemax=99
|
:set tabpagemax=99
|
||||||
nmap <C-a> :tabnew<cr>
|
nmap <C-a> :tabnew<cr>
|
||||||
imap <C-a> <ESC>:tabnew<cr>
|
imap <C-a> <ESC>:tabnew<cr>
|
||||||
map <C-k> :tabnext<cr>
|
map <C-x>n :tabnext<cr>
|
||||||
nmap <C-k> :tabnext<cr>
|
nmap <C-x>n :tabnext<cr>
|
||||||
imap <C-k> :tabnext<cr>
|
imap <C-x>n :tabnext<cr>
|
||||||
map <C-j> :tabprev<cr>
|
map <C-x>p :tabprev<cr>
|
||||||
nmap <C-j> :tabprev<cr>
|
nmap <C-x>p :tabprev<cr>
|
||||||
imap <C-j> :tabprev<cr>
|
imap <C-x>p :tabprev<cr>
|
||||||
|
|
||||||
" кириллица
|
" кириллица
|
||||||
set encoding=utf-8
|
set encoding=utf-8
|
||||||
|
@ -80,6 +131,7 @@ menu Encoding.CP866 :e ++enc=cp866<CR>
|
||||||
menu Encoding.KOI8-U :e ++enc=koi8-u<CR>
|
menu Encoding.KOI8-U :e ++enc=koi8-u<CR>
|
||||||
menu Encoding.UTF-8 :e ++enc=utf-8<CR>
|
menu Encoding.UTF-8 :e ++enc=utf-8<CR>
|
||||||
map <F8> :emenu Encoding.<TAB>
|
map <F8> :emenu Encoding.<TAB>
|
||||||
|
set fileencodings=utf-8,cp1251,cp866,koi8-r
|
||||||
|
|
||||||
" вкл/выкл автоперенос
|
" вкл/выкл автоперенос
|
||||||
set pastetoggle=<F5>
|
set pastetoggle=<F5>
|
||||||
|
@ -105,14 +157,130 @@ function! ToggleMyFontSize()
|
||||||
endfunction
|
endfunction
|
||||||
nnoremap <silent> <F12> :call ToggleMyFontSize()<CR>
|
nnoremap <silent> <F12> :call ToggleMyFontSize()<CR>
|
||||||
|
|
||||||
" теги
|
" ctags/cscope
|
||||||
set tags+=./.ctags
|
let local_tags = ".ctags"
|
||||||
set tags+=~/.big/ctags
|
let local_tags2 = "tags"
|
||||||
cscope add ./.cscope
|
let local_cscope = ".cscope.out"
|
||||||
cscope add ~/.big/cscope
|
let local_cscope2 = "cscope.out"
|
||||||
|
let local_path = "/"
|
||||||
|
let current_path = getcwd()
|
||||||
|
" If the current path is a child of $HOME directory, start from $HOME
|
||||||
|
if current_path =~ $HOME
|
||||||
|
let local_path = $HOME . local_path
|
||||||
|
let current_path = substitute(current_path, $HOME, '', "")
|
||||||
|
endif
|
||||||
|
let path_parts = split(current_path, "/")
|
||||||
|
for path_part in path_parts
|
||||||
|
let local_path = local_path . path_part . "/"
|
||||||
|
if filereadable(local_path . local_tags)
|
||||||
|
exe ":set tags+=" . local_path . local_tags
|
||||||
|
endif
|
||||||
|
if filereadable(local_path . local_tags2)
|
||||||
|
exe ":set tags+=" . local_path . local_tags2
|
||||||
|
endif
|
||||||
|
if filereadable(local_path . local_cscope)
|
||||||
|
exe "cs add" local_path . local_cscope
|
||||||
|
endif
|
||||||
|
if filereadable(local_path . local_cscope2)
|
||||||
|
exe "cs add" local_path . local_cscope2
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
unlet local_tags local_tags2 local_cscope local_cscope2 local_path current_path path_parts
|
||||||
|
|
||||||
map <F4> [I:let nr = input("Which one: ")<Bar>exe "normal " . nr ."[\t"<CR>
|
map <F4> [I:let nr = input("Which one: ")<Bar>exe "normal " . nr ."[\t"<CR>
|
||||||
|
|
||||||
" Foldging
|
" Foldging
|
||||||
set foldenable
|
set foldenable
|
||||||
set foldmethod=syntax
|
" set foldmethod=syntax
|
||||||
|
|
||||||
|
" VUNDLE "
|
||||||
|
set nocompatible " be iMproved
|
||||||
|
filetype off " required!
|
||||||
|
|
||||||
|
set rtp+=~/.vim/bundle/vundle/
|
||||||
|
call vundle#rc()
|
||||||
|
|
||||||
|
" let Vundle manage Vundle
|
||||||
|
" required!
|
||||||
|
Bundle 'gmarik/vundle'
|
||||||
|
|
||||||
|
" My Bundles here:
|
||||||
|
"
|
||||||
|
" original repos on github
|
||||||
|
Bundle 'tpope/vim-fugitive'
|
||||||
|
Bundle 'Lokaltog/vim-easymotion'
|
||||||
|
" Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
|
||||||
|
Bundle 'tpope/vim-rails.git'
|
||||||
|
" vim-scripts repos
|
||||||
|
Bundle 'L9'
|
||||||
|
Bundle 'FuzzyFinder'
|
||||||
|
Bundle 'vim-tags'
|
||||||
|
" non github repos
|
||||||
|
Bundle 'git://git.wincent.com/command-t.git'
|
||||||
|
" ...
|
||||||
|
Bundle 'majutsushi/tagbar'
|
||||||
|
Bundle 'vim-startify'
|
||||||
|
" Bundle 'clang-complete'
|
||||||
|
Bundle 'scrooloose/nerdcommenter'
|
||||||
|
" Bundle 'vim-scripts/OmniCppComplete'
|
||||||
|
|
||||||
|
filetype plugin indent on " required!
|
||||||
|
"
|
||||||
|
" Brief help
|
||||||
|
" :BundleList - list configured bundles
|
||||||
|
" :BundleInstall(!) - install(update) bundles
|
||||||
|
" :BundleSearch(!) foo - search(or refresh cache first) for foo
|
||||||
|
" :BundleClean(!) - confirm(or auto-approve) removal of unused bundles
|
||||||
|
"
|
||||||
|
" see :h vundle for more details or wiki for FAQ
|
||||||
|
" NOTE: comments after Bundle command are not allowed..
|
||||||
|
|
||||||
|
" clang_complete
|
||||||
|
" let g:clang_complete_copen = 1
|
||||||
|
" let g:clang_user_options='|| exit 0'
|
||||||
|
filetype plugin on
|
||||||
|
let g:clang_library_path="/usr/lib/llvm"
|
||||||
|
let g:clang_user_options='|| exit 0'
|
||||||
|
let g:clang_complete_auto = 1
|
||||||
|
let g:clang_complete_copen = 0
|
||||||
|
|
||||||
|
" ------- Vala --------
|
||||||
|
" Disable valadoc syntax highlight
|
||||||
|
"let vala_ignore_valadoc = 1
|
||||||
|
|
||||||
|
" Enable comment strings
|
||||||
|
let vala_comment_strings = 1
|
||||||
|
|
||||||
|
" Highlight space errors
|
||||||
|
let vala_space_errors = 1
|
||||||
|
" Disable trailing space errors
|
||||||
|
"let vala_no_trail_space_error = 1
|
||||||
|
" Disable space-tab-space errors
|
||||||
|
let vala_no_tab_space_error = 1
|
||||||
|
|
||||||
|
" Minimum lines used for comment syncing (default 50)
|
||||||
|
"let vala_minlines = 120
|
||||||
|
|
||||||
|
" ----- Vala taglist ------
|
||||||
|
" Work-around Tag List for Vala
|
||||||
|
let tlist_vala_settings='c#;d:macro;t:typedef;n:namespace;c:class;'.
|
||||||
|
\ 'E:event;g:enum;s:struct;i:interface;'.
|
||||||
|
\ 'p:properties;m:method'
|
||||||
|
|
||||||
|
" ----- TagBar ------
|
||||||
|
nmap <F9> :TagbarToggle<CR>
|
||||||
|
let g:tagbar_ctags_bin = "anjuta-tags"
|
||||||
|
|
||||||
|
" ----- NERDTree ------
|
||||||
|
nmap <F12> :NERDTreeToggle<CR>
|
||||||
|
|
||||||
|
" ------- VimDiff -------
|
||||||
|
if &diff
|
||||||
|
let mapleader = ","
|
||||||
|
map dp1 :diffput LOCAL<CR>
|
||||||
|
map dp2 :diffput BASE<CR>
|
||||||
|
map dp3 :diffput REMOTE<CR>
|
||||||
|
map do1 :diffget LOCAL<CR>
|
||||||
|
map do2 :diffget BASE<CR>
|
||||||
|
map do3 :diffget REMOTE<CR>
|
||||||
|
endif
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
DEFAULT_SESSION=awesome
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
urxvt)
|
||||||
|
exec urxvt
|
||||||
|
;;
|
||||||
|
awesome)
|
||||||
|
exec awesome
|
||||||
|
;;
|
||||||
|
fvwm-crystal)
|
||||||
|
exec fvwm-crystal
|
||||||
|
;;
|
||||||
|
fvwm) exec fvwm
|
||||||
|
;;
|
||||||
|
kde)
|
||||||
|
exec startkde
|
||||||
|
;;
|
||||||
|
xfce4)
|
||||||
|
exec startxfce4
|
||||||
|
;;
|
||||||
|
fluxbox)
|
||||||
|
exec startfluxbox
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
exec $DEFAULT_SESSION
|
||||||
|
;;
|
||||||
|
esac
|
|
@ -0,0 +1,299 @@
|
||||||
|
# XScreenSaver Preferences File
|
||||||
|
# Written by xscreensaver-settings 6.07 for kolan on Fri Nov 17 11:56:11 2023.
|
||||||
|
# https://www.jwz.org/xscreensaver/
|
||||||
|
|
||||||
|
timeout: 0:08:00
|
||||||
|
cycle: 0:00:00
|
||||||
|
lock: True
|
||||||
|
lockTimeout: 0:30:00
|
||||||
|
passwdTimeout: 0:00:30
|
||||||
|
visualID: default
|
||||||
|
installColormap: True
|
||||||
|
verbose: False
|
||||||
|
splash: True
|
||||||
|
splashDuration: 0:00:05
|
||||||
|
demoCommand: xscreensaver-settings
|
||||||
|
nice: 10
|
||||||
|
fade: True
|
||||||
|
unfade: False
|
||||||
|
fadeSeconds: 0:00:03
|
||||||
|
ignoreUninstalledPrograms:False
|
||||||
|
dpmsEnabled: True
|
||||||
|
dpmsQuickOff: True
|
||||||
|
dpmsStandby: 0:08:00
|
||||||
|
dpmsSuspend: 0:08:00
|
||||||
|
dpmsOff: 0:08:00
|
||||||
|
grabDesktopImages: False
|
||||||
|
grabVideoFrames: False
|
||||||
|
chooseRandomImages: False
|
||||||
|
imageDirectory:
|
||||||
|
|
||||||
|
mode: blank
|
||||||
|
selected: -1
|
||||||
|
|
||||||
|
textMode: date
|
||||||
|
textLiteral: XScreenSaver
|
||||||
|
textFile: /etc/gentoo-release
|
||||||
|
textProgram: fortune
|
||||||
|
textURL: https://planet.gentoo.org/rss20.xml
|
||||||
|
dialogTheme: default
|
||||||
|
settingsGeom: 1920,15 -1,-1
|
||||||
|
|
||||||
|
programs: \
|
||||||
|
maze --root \n\
|
||||||
|
GL: superquadrics --root \n\
|
||||||
|
attraction --root \n\
|
||||||
|
blitspin --root \n\
|
||||||
|
greynetic --root \n\
|
||||||
|
helix --root \n\
|
||||||
|
hopalong --root \n\
|
||||||
|
imsmap --root \n\
|
||||||
|
- noseguy --root \n\
|
||||||
|
- pyro --root \n\
|
||||||
|
qix --root \n\
|
||||||
|
- rocks --root \n\
|
||||||
|
rorschach --root \n\
|
||||||
|
decayscreen --root \n\
|
||||||
|
flame --root \n\
|
||||||
|
halo --root \n\
|
||||||
|
slidescreen --root \n\
|
||||||
|
pedal --root \n\
|
||||||
|
bouboule --root \n\
|
||||||
|
- braid --root \n\
|
||||||
|
coral --root \n\
|
||||||
|
deco --root \n\
|
||||||
|
drift --root \n\
|
||||||
|
- fadeplot --root \n\
|
||||||
|
galaxy --root \n\
|
||||||
|
goop --root \n\
|
||||||
|
grav --root \n\
|
||||||
|
ifs --root \n\
|
||||||
|
GL: jigsaw --root \n\
|
||||||
|
julia --root \n\
|
||||||
|
- kaleidescope --root \n\
|
||||||
|
GL: moebius --root \n\
|
||||||
|
moire --root \n\
|
||||||
|
GL: morph3d --root \n\
|
||||||
|
mountain --root \n\
|
||||||
|
munch --root \n\
|
||||||
|
penrose --root \n\
|
||||||
|
GL: pipes --root \n\
|
||||||
|
rdbomb --root \n\
|
||||||
|
GL: rubik --root \n\
|
||||||
|
- sierpinski --root \n\
|
||||||
|
slip --root \n\
|
||||||
|
GL: sproingies --root \n\
|
||||||
|
starfish --root \n\
|
||||||
|
strange --root \n\
|
||||||
|
swirl --root \n\
|
||||||
|
triangle --root \n\
|
||||||
|
xjack --root \n\
|
||||||
|
xlyap --root \n\
|
||||||
|
GL: atlantis --root \n\
|
||||||
|
bsod --root \n\
|
||||||
|
GL: bubble3d --root \n\
|
||||||
|
GL: cage --root \n\
|
||||||
|
- crystal --root \n\
|
||||||
|
cynosure --root \n\
|
||||||
|
discrete --root \n\
|
||||||
|
distort --root \n\
|
||||||
|
epicycle --root \n\
|
||||||
|
flow --root \n\
|
||||||
|
GL: glplanet --root \n\
|
||||||
|
interference --root \n\
|
||||||
|
kumppa --root \n\
|
||||||
|
GL: lament --root \n\
|
||||||
|
moire2 --root \n\
|
||||||
|
GL: sonar --root \n\
|
||||||
|
GL: stairs --root \n\
|
||||||
|
truchet --root \n\
|
||||||
|
- vidwhacker --root \n\
|
||||||
|
- webcollage --root \n\
|
||||||
|
blaster --root \n\
|
||||||
|
bumps --root \n\
|
||||||
|
ccurve --root \n\
|
||||||
|
compass --root \n\
|
||||||
|
deluxe --root \n\
|
||||||
|
- demon --root \n\
|
||||||
|
- GL: extrusion --root \n\
|
||||||
|
- loop --root \n\
|
||||||
|
penetrate --root \n\
|
||||||
|
petri --root \n\
|
||||||
|
phosphor --root \n\
|
||||||
|
GL: pulsar --root \n\
|
||||||
|
ripples --root \n\
|
||||||
|
shadebobs --root \n\
|
||||||
|
GL: sierpinski3d --root \n\
|
||||||
|
spotlight --root \n\
|
||||||
|
squiral --root \n\
|
||||||
|
wander --root \n\
|
||||||
|
xflame --root \n\
|
||||||
|
xmatrix --root \n\
|
||||||
|
GL: gflux --root \n\
|
||||||
|
- nerverot --root \n\
|
||||||
|
xrayswarm --root \n\
|
||||||
|
xspirograph --root \n\
|
||||||
|
GL: circuit --root \n\
|
||||||
|
GL: dangerball --root \n\
|
||||||
|
- GL: dnalogo --root \n\
|
||||||
|
GL: engine --root \n\
|
||||||
|
GL: flipscreen3d --root \n\
|
||||||
|
GL: gltext --root \n\
|
||||||
|
GL: menger --root \n\
|
||||||
|
GL: molecule --root \n\
|
||||||
|
rotzoomer --root \n\
|
||||||
|
scooter --root \n\
|
||||||
|
speedmine --root \n\
|
||||||
|
GL: starwars --root \n\
|
||||||
|
GL: stonerview --root \n\
|
||||||
|
vermiculate --root \n\
|
||||||
|
whirlwindwarp --root \n\
|
||||||
|
zoom --root \n\
|
||||||
|
anemone --root \n\
|
||||||
|
apollonian --root \n\
|
||||||
|
GL: boxed --root \n\
|
||||||
|
GL: cubenetic --root \n\
|
||||||
|
GL: endgame --root \n\
|
||||||
|
euler2d --root \n\
|
||||||
|
fluidballs --root \n\
|
||||||
|
GL: flurry --root \n\
|
||||||
|
- GL: glblur --root \n\
|
||||||
|
GL: glsnake --root \n\
|
||||||
|
halftone --root \n\
|
||||||
|
GL: juggler3d --root \n\
|
||||||
|
GL: lavalite --root \n\
|
||||||
|
- polyominoes --root \n\
|
||||||
|
GL: queens --root \n\
|
||||||
|
- GL: sballs --root \n\
|
||||||
|
GL: spheremonics --root \n\
|
||||||
|
twang --root \n\
|
||||||
|
- GL: antspotlight --root \n\
|
||||||
|
apple2 --root \n\
|
||||||
|
GL: atunnel --root \n\
|
||||||
|
barcode --root \n\
|
||||||
|
GL: blinkbox --root \n\
|
||||||
|
GL: blocktube --root \n\
|
||||||
|
GL: bouncingcow --root \n\
|
||||||
|
cloudlife --root \n\
|
||||||
|
GL: cubestorm --root \n\
|
||||||
|
eruption --root \n\
|
||||||
|
GL: flipflop --root \n\
|
||||||
|
GL: flyingtoasters --root \n\
|
||||||
|
fontglide --root \n\
|
||||||
|
GL: gleidescope --root \n\
|
||||||
|
GL: glknots --root \n\
|
||||||
|
GL: glmatrix --root \n\
|
||||||
|
- GL: glslideshow --root \n\
|
||||||
|
GL: hypertorus --root \n\
|
||||||
|
- GL: jigglypuff --root \n\
|
||||||
|
metaballs --root \n\
|
||||||
|
GL: mirrorblob --root \n\
|
||||||
|
piecewise --root \n\
|
||||||
|
GL: polytopes --root \n\
|
||||||
|
pong --root \n\
|
||||||
|
popsquares --root \n\
|
||||||
|
GL: surfaces --root \n\
|
||||||
|
xanalogtv --root \n\
|
||||||
|
abstractile --root \n\
|
||||||
|
anemotaxis --root \n\
|
||||||
|
- GL: antinspect --root \n\
|
||||||
|
fireworkx --root \n\
|
||||||
|
fuzzyflakes --root \n\
|
||||||
|
interaggregate --root \n\
|
||||||
|
intermomentary --root \n\
|
||||||
|
memscroller --root \n\
|
||||||
|
GL: noof --root \n\
|
||||||
|
pacman --root \n\
|
||||||
|
GL: pinion --root \n\
|
||||||
|
GL: polyhedra --root \n\
|
||||||
|
- GL: providence --root \n\
|
||||||
|
substrate --root \n\
|
||||||
|
wormhole --root \n\
|
||||||
|
- GL: antmaze --root \n\
|
||||||
|
GL: boing --root \n\
|
||||||
|
boxfit --root \n\
|
||||||
|
GL: carousel --root \n\
|
||||||
|
celtic --root \n\
|
||||||
|
GL: crackberg --root \n\
|
||||||
|
GL: cube21 --root \n\
|
||||||
|
fiberlamp --root \n\
|
||||||
|
GL: fliptext --root \n\
|
||||||
|
GL: glhanoi --root \n\
|
||||||
|
GL: tangram --root \n\
|
||||||
|
GL: timetunnel --root \n\
|
||||||
|
GL: glschool --root \n\
|
||||||
|
GL: topblock --root \n\
|
||||||
|
GL: cubicgrid --root \n\
|
||||||
|
cwaves --root \n\
|
||||||
|
GL: gears --root \n\
|
||||||
|
GL: glcells --root \n\
|
||||||
|
GL: lockward --root \n\
|
||||||
|
m6502 --root \n\
|
||||||
|
GL: moebiusgears --root \n\
|
||||||
|
GL: voronoi --root \n\
|
||||||
|
GL: hypnowheel --root \n\
|
||||||
|
GL: klein --root \n\
|
||||||
|
- lcdscrub --root \n\
|
||||||
|
GL: photopile --root \n\
|
||||||
|
GL: skytentacles --root \n\
|
||||||
|
GL: rubikblocks --root \n\
|
||||||
|
GL: companioncube --root \n\
|
||||||
|
GL: hilbert --root \n\
|
||||||
|
GL: tronbit --root \n\
|
||||||
|
GL: geodesic --root \n\
|
||||||
|
hexadrop --root \n\
|
||||||
|
GL: kaleidocycle --root \n\
|
||||||
|
GL: quasicrystal --root \n\
|
||||||
|
GL: unknownpleasures --root \n\
|
||||||
|
binaryring --root \n\
|
||||||
|
GL: cityflow --root \n\
|
||||||
|
GL: geodesicgears --root \n\
|
||||||
|
GL: projectiveplane --root \n\
|
||||||
|
GL: romanboy --root \n\
|
||||||
|
tessellimage --root \n\
|
||||||
|
GL: winduprobot --root \n\
|
||||||
|
GL: splitflap --root \n\
|
||||||
|
GL: cubestack --root \n\
|
||||||
|
GL: cubetwist --root \n\
|
||||||
|
GL: discoball --root \n\
|
||||||
|
GL: dymaxionmap --root \n\
|
||||||
|
GL: energystream --root \n\
|
||||||
|
GL: hexstrut --root \n\
|
||||||
|
GL: hydrostat --root \n\
|
||||||
|
GL: raverhoop --root \n\
|
||||||
|
GL: splodesic --root \n\
|
||||||
|
GL: unicrud --root \n\
|
||||||
|
GL: esper --root \n\
|
||||||
|
GL: vigilance --root \n\
|
||||||
|
GL: crumbler --root \n\
|
||||||
|
filmleader --root \n\
|
||||||
|
glitchpeg --root \n\
|
||||||
|
GL: handsy --root \n\
|
||||||
|
GL: maze3d --root \n\
|
||||||
|
GL: peepers --root \n\
|
||||||
|
GL: razzledazzle --root \n\
|
||||||
|
vfeedback --root \n\
|
||||||
|
GL: deepstars --root \n\
|
||||||
|
GL: gravitywell --root \n\
|
||||||
|
GL: beats --root \n\
|
||||||
|
GL: covid19 --root \n\
|
||||||
|
GL: etruscanvenus --root \n\
|
||||||
|
GL: gibson --root \n\
|
||||||
|
GL: headroom --root \n\
|
||||||
|
GL: sphereeversion --root \n\
|
||||||
|
binaryhorizon --root \n\
|
||||||
|
marbling --root \n\
|
||||||
|
GL: chompytower --root \n\
|
||||||
|
GL: hextrail --root \n\
|
||||||
|
GL: mapscroller --root \n\
|
||||||
|
GL: nakagin --root \n\
|
||||||
|
GL: squirtorus --root \n\
|
||||||
|
GL: cubocteversion --root \n\
|
||||||
|
droste --root \n\
|
||||||
|
GL: papercube --root \n\
|
||||||
|
GL: skulloop --root \n\
|
||||||
|
|
||||||
|
|
||||||
|
pointerHysteresis: 10
|
||||||
|
authWarningSlack: 20
|
||||||
|
|
Loading…
Reference in New Issue