Permalink
Browse files

A nice custom setup to Vintageous

1. ctrl+a, w, s, n, f stick to sublime defaults.
2. "vintageous_use_ctrl_keys": true,
3. "vintageous_use_sys_clipboard": true,
4. "vintageous_reset_mode_when_switching_tabs": false,
5. Pasting over a current selection does not copy, like is normally done in vim.
  • Loading branch information...
theicfire committed Feb 10, 2015
1 parent 43cf37a commit 19ff6311b01e3ae259b7eb8e3944687b42ba06ff
Showing with 18 additions and 18 deletions.
  1. +6 −6 Default.sublime-keymap
  2. +4 −4 Preferences.sublime-settings
  3. +8 −8 xactions.py
View
@@ -40,7 +40,7 @@
{"keys": ["{"], "command": "press_key", "args": {"key": "{"}, "context": [{"key": "vi_command_mode_aware"}]},
{"keys": ["]"], "command": "press_key", "args": {"key": "]"}, "context": [{"key": "vi_command_mode_aware"}]},
{"keys": ["["], "command": "press_key", "args": {"key": "["}, "context": [{"key": "vi_command_mode_aware"}]},
- {"keys": ["tab"], "command": "press_key", "args": {"key": "<tab>"}, "context": [{"key": "vi_command_mode_aware"}]},
+ //{"keys": ["tab"], "command": "press_key", "args": {"key": "<tab>"}, "context": [{"key": "vi_command_mode_aware"}]},
{"keys": ["backspace"], "command": "press_key", "args": {"key": "<bs>"}, "context": [{"key": "vi_command_mode_aware"}]},
{"keys": ["up"], "command": "press_key", "args": {"key": "<up>"}, "context": [{"key": "vi_command_mode_aware"}]},
@@ -108,30 +108,30 @@
{"keys": ["Ç"], "command": "press_key", "args": {"key": "Ç"}, "context": [{"key": "vi_command_mode_aware"}]},
{"keys": ["Ñ"], "command": "press_key", "args": {"key": "Ñ"}, "context": [{"key": "vi_command_mode_aware"}]},
- {"keys": ["ctrl+a"], "command": "press_key", "args": {"key": "<C-a>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
+ //{"keys": ["ctrl+a"], "command": "press_key", "args": {"key": "<C-a>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+b"], "command": "press_key", "args": {"key": "<C-b>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+c"], "command": "press_key", "args": {"key": "<C-c>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+d"], "command": "press_key", "args": {"key": "<C-d>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+e"], "command": "press_key", "args": {"key": "<C-e>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
- {"keys": ["ctrl+f"], "command": "press_key", "args": {"key": "<C-f>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
+ //{"keys": ["ctrl+f"], "command": "press_key", "args": {"key": "<C-f>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+g"], "command": "press_key", "args": {"key": "<C-g>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+h"], "command": "press_key", "args": {"key": "<C-h>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+i"], "command": "press_key", "args": {"key": "<C-i>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+j"], "command": "press_key", "args": {"key": "<C-j>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+k"], "command": "press_key", "args": {"key": "<C-k>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+l"], "command": "press_key", "args": {"key": "<C-l>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+m"], "command": "press_key", "args": {"key": "<C-m>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
- {"keys": ["ctrl+n"], "command": "press_key", "args": {"key": "<C-n>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
+ //{"keys": ["ctrl+n"], "command": "press_key", "args": {"key": "<C-n>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+o"], "command": "press_key", "args": {"key": "<C-o>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+p"], "command": "press_key", "args": {"key": "<C-p>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+r"], "command": "press_key", "args": {"key": "<C-r>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+q"], "command": "press_key", "args": {"key": "<C-q>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+r"], "command": "press_key", "args": {"key": "<C-r>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
- {"keys": ["ctrl+s"], "command": "press_key", "args": {"key": "<C-s>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
+ //{"keys": ["ctrl+s"], "command": "press_key", "args": {"key": "<C-s>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+t"], "command": "press_key", "args": {"key": "<C-t>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+u"], "command": "press_key", "args": {"key": "<C-u>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+v"], "command": "press_key", "args": {"key": "<C-v>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
- {"keys": ["ctrl+w"], "command": "press_key", "args": {"key": "<C-w>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
+ //{"keys": ["ctrl+w"], "command": "press_key", "args": {"key": "<C-w>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+x"], "command": "press_key", "args": {"key": "<C-x>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+y"], "command": "press_key", "args": {"key": "<C-y>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
{"keys": ["ctrl+z"], "command": "press_key", "args": {"key": "<C-z>"}, "context": [{"key": "vi_command_mode_aware"}, {"key": "vi_use_ctrl_keys"}]},
@@ -4,7 +4,7 @@
// If true, some key bindings prefaced by the CTRL modifier will override default Sublime Text
// key bindings.
- "vintageous_use_ctrl_keys": false,
+ "vintageous_use_ctrl_keys": true,
// If true, search occurrences will be highlighted in '/', '?', etc.
// (Disabled.)
@@ -18,14 +18,14 @@
"vintageous_enable_cmdline_mode": true,
// If true, the current mode will be reset to normal mode when a tab gets activated.
- "vintageous_reset_mode_when_switching_tabs": true,
+ "vintageous_reset_mode_when_switching_tabs": false,
// If true, some commands will take the current indentation level into account.
// (Disabled.)
"vintageous_autoindent": true,
// If true, copy actions will always propagate to the system clipboard.
- "vintageous_use_sys_clipboard": false,
+ "vintageous_use_sys_clipboard": true,
// If true, / and ? will use regular expressions.
// If false, smart case will be used instead: the pattern will be interpreted literally and, if
@@ -39,4 +39,4 @@
// values are 'debug', 'info', 'error', 'critical'. Most users should
// not need to modify the default value.
"vintageous_log_level": "error"
-}
+}
View
@@ -1806,8 +1806,8 @@ def __init__(self, *args, **kwargs):
def run(self, edit, register=None, count=1, mode=None):
state = self.state
- if state.mode == modes.VISUAL:
- prev_text = state.registers.get_selected_text(self)
+ #if state.mode == modes.VISUAL:
+ #prev_text = state.registers.get_selected_text(self)
if register:
fragments = state.registers[register]
@@ -1816,9 +1816,9 @@ def run(self, edit, register=None, count=1, mode=None):
# register's content.
fragments = state.registers['"']
- if state.mode == modes.VISUAL:
- # Populate registers with the text we're about to paste.
- state.registers['"'] = prev_text
+ #if state.mode == modes.VISUAL:
+ ## Populate registers with the text we're about to paste.
+ #state.registers['"'] = prev_text
# TODO: Enable pasting to multiple selections.
sel = list(self.view.sel())[0]
@@ -1885,9 +1885,9 @@ def run(self, edit, register=None, count=1, mode=None):
print("Vintageous: Nothing in register \".")
return
- if state.mode == modes.VISUAL:
- prev_text = state.registers.get_selected_text(self)
- state.registers['"'] = prev_text
+ #if state.mode == modes.VISUAL:
+ #prev_text = state.registers.get_selected_text(self)
+ #state.registers['"'] = prev_text
sels = list(self.view.sel())
# If we have the same number of pastes and selections, map 1:1. Otherwise paste paste[0]

0 comments on commit 19ff631

Please sign in to comment.