--- a/autoload/threesomelib/util/keys.py Fri Sep 02 09:36:27 2011 -0400
+++ b/autoload/threesomelib/util/keys.py Fri Sep 02 09:52:05 2011 -0400
@@ -1,20 +1,33 @@
import vim
from bufferlib import buffers
+from ..settings import setting
-def bind(key, to, options='', mode=None, leader='<localleader>'):
+def bind(key, to, options='', mode=None, leader=None):
+ if not leader:
+ leader = setting('leader', '<localleader>')
+
vim.command('nnoremap %s %s%s %s' % (options, leader, key, to))
-def unbind(key, options='', leader='<localleader>'):
+def unbind(key, options='', leader=None):
+ if not leader:
+ leader = setting('leader', '<localleader>')
+
vim.command('unmap %s %s%s' % (options, leader, key))
-def bind_for_all(key, to, options='', mode=None, leader='<localleader>'):
+def bind_for_all(key, to, options='', mode=None, leader=None):
+ if not leader:
+ leader = setting('leader', '<localleader>')
+
with buffers.remain():
for b in buffers.all:
b.open()
bind(key, to, options, mode, leader)
-def unbind_for_all(key, options='', leader='<localleader>'):
+def unbind_for_all(key, options='', leader=None):
+ if not leader:
+ leader = setting('leader', '<localleader>')
+
with buffers.remain():
for b in buffers.all:
b.open()
--- a/doc/threesome.txt Fri Sep 02 09:36:27 2011 -0400
+++ b/doc/threesome.txt Fri Sep 02 09:52:05 2011 -0400
@@ -51,7 +51,8 @@
5.13 threesome_initial_scrollbind_compare .. |ThreesomeConfig_is_compare|
5.14 threesome_initial_scrollbind_path ..... |ThreesomeConfig_is_path|
5.15 threesome_initial_mode ................ |ThreesomeConfig_im|
- 5.16 threesome_wrap ........................ |ThreesomeConfig_wrap|
+ 5.16 threesome_leader ...................... |ThreesomeConfig_leader|
+ 5.17 threesome_wrap ........................ |ThreesomeConfig_wrap|
6. License ..................................... |ThreesomeLicense|
7. Bugs ........................................ |ThreesomeBugs|
8. Contributing ................................ |ThreesomeContributing|
@@ -558,7 +559,22 @@
Default: "grid"
------------------------------------------------------------------------------
-5.16 g:threesome_wrap *ThreesomeConfig_wrap*
+5.16 g:threesome_leader *ThreesomeConfig_leader*
+
+Set this to change the leader Threesome will bind all of its mappings to.
+
+For example: >
+
+ let g:threesome_leader = "<leader>t"
+
+Will make all Threesome commands start with <leader>t instead of the default
+<localleader>.
+
+Options: Any valid key mapping string
+Default: "<localleader>"
+
+------------------------------------------------------------------------------
+5.17 g:threesome_wrap *ThreesomeConfig_wrap*
Set this to "wrap" or "nowrap" to set |wrap| or |nowrap| on all windows by
default.
@@ -595,6 +611,8 @@
==============================================================================
9. Changelog *ThreesomeChangelog*
+v0.2.0
+ * Add threesome_leader as a config option.
v0.1.1
* Fix a bug when the user doesn't use :set hidden.
v0.1.0