Home Download Buy Blog Forum Support

remap keys

remap keys

Postby ArmendGashi on Tue Dec 31, 2013 4:17 am

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 vs for Vertical SPLIT


Code: Select all
{
      "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
Code: Select all
{ "keys": ["m", "l"],  "command": "move_to_group", "args": { "group": 0 } },

Move file Right
Code: Select all
{ "keys": ["m", "r"],  "command": "move_to_group", "args": { "group": 1 } },


Switch on full screen
Code: Select all
{ "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
@Armend_Gashii
ArmendGashi
 
Posts: 2
Joined: Tue Dec 31, 2013 4:05 am

Re: remap keys

Postby skuroda on Tue Dec 31, 2013 5:24 am

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

Code: Select all
"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.
skuroda
 
Posts: 685
Joined: Fri Oct 05, 2012 8:11 am

Re: remap keys

Postby ArmendGashi on Tue Dec 31, 2013 11:04 pm

Thank you @skuroda

Also maybe someone can find any usefull shortcut on my keymap here EasyNavigationKeymap
@Armend_Gashii
ArmendGashi
 
Posts: 2
Joined: Tue Dec 31, 2013 4:05 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 22 guests