Sublime Forum

Remap keys

#1

I’m a vim user and I just want to know is there a way to remap key’s to take effect only when i’m on vim normal mode, for example if i want to split window i can switch on vim mode in normal mode then type [size=150]vs[/size] for Vertical SPLIT

{ "keys": "v", "s"], "command": "set_layout", "args": { "cols": [0.0, 0.5, 1.0], "rows": [0.0, 1.0], "cells": [0, 0, 1, 1], [1, 0, 2, 1]] } },

Move file left
{ "keys": "m", "l"], "command": "move_to_group", "args": { "group": 0 } },
Move file Right
{ "keys": "m", "r"], "command": "move_to_group", "args": { "group": 1 } },

Switch on full screen

{ "keys": "f", "S"], "command": "toggle_full_screen" },

this would be very good if its possible to enable key’s only on normal vim mode

Now i’m using this method typining one of char upper case

0 Likes

#2

Are you using vintage mode (or vintageous if you are on ST3)? If so, you can create a key binding context like

 "context": {"key": "setting.command_mode"}]

In fact, you may want to investigate the Origami plugin. Then you could take a look at Vintage Origami for how they set up key bindings to work only in normal mode.

0 Likes

#3

Thank you @skuroda

Also maybe someone can find any usefull shortcut on my keymap here EasyNavigationKeymap

0 Likes