keymapping

Is it possible in Pycharm to map a tab to produce 4 spaces. If so how?

£可爱£侵袭症+ 提交于 2019-12-12 09:10:26
问题 this is my first time using an IDE. I was wondering if its possible, as I've done in vim with imap, to make it so that when I press tab 4 spaces are produced in the editor. If this is possible, please point me how to do it. I'm not super familiar with key symbols so please be as explicit a possible; I poked around the keymap under settings but it was pretty confusing. 回答1: You can customize the Tab size in Pycharm. Goto Preference --> Editor --> Code Style --> Python. 来源: https:/

Vim remap only if source file is in LaTeX [duplicate]

狂风中的少年 提交于 2019-12-11 09:46:23
问题 This question already has answers here : Vim inoremap for specific filetypes (5 answers) Is there a better way to map command call based on filetype [duplicate] (2 answers) Closed last year . I've got a ½ key on my keyboard and sometimes I want to use it when I'm editing LaTeX in Vim to expand to the right expression i.e. \frac{1}{2} . I know I should do something like : inoremap ½ \frac{1}{2} Now, how do I make this work only with LaTeX files ? 回答1: You want Fietype specific autocmds:

Why does this Vim mapping behave differently depending on how Visual mode was entered?

喜夏-厌秋 提交于 2019-12-10 18:30:05
问题 This question is what prompted a previous question of mine here: Vim's '(insert) VISUAL' mode? In that question I asked about " VISUAL " mode vs " (insert) VISUAL " mode, which is where you enter visual mode directly from insert mode. I have found a mapping that behaves differently depending on the "subtype" of visual mode, and I don't understand why: vnoremap x <Esc>jjj vnoremap <A-[> <C-G>ugv The first mapping illustrates how Vim goes out of its way to make mappings to behave consistently:

JTextComponent Keymap

a 夏天 提交于 2019-12-10 16:27:28
问题 I need to create a class derived from JTextComponent (from JTextPane , actually) in which at least one of the default key mappings is changed. That is, in my special JTextPane, I want the ">" keystroke to perform an action and NOT add that character to the text pane as, by default all printable typed characters are treated. To defeat the normal behavior, there are the following APIs: JTextComponent.getKeymap() Keymap.addActionForKeyStroke() JTextComponent.setKeymap() However, I find that

Determine if a key sequence has already been assigned in Sublime Text

若如初见. 提交于 2019-12-10 05:40:13
问题 Does Sublime Text (2|3) have an API method or some way of determining if a shortcut or hot key sequence has already been assigned? I have lots of plugins and macros installed, and when making new ones it can be difficult to determine what key sequence to assign it to so I don't conflict with something else. Key bindings can be assigned in .sublime-keymap files in Packages/Default , Packages/User , and whichever plugin wants to assign them. To make things more complicated, I work on three

How to use Mac OSX Keymap on Windows for WebStorm or IntelliJ IDEA?

蓝咒 提交于 2019-12-09 05:59:31
问题 I use WebStorm on both my Mac and Windows for work purposes. I would like to know if it is possible to use the MAC OSX keymap on Windows. On windows if you load the MAC OSX keymap the mappings don't seem to line up correctly. For instance I see the character Meta being used, however Windows doesn't seem to properly map that character. I also would like to note I am using a Mac keyboard on the Windows PC. 回答1: How does Cmd ( Meta ) key map to your Windows keys? You can get the full Mac keymap

Vim langmap breaks plugin (bépo)

柔情痞子 提交于 2019-12-08 20:41:27
问题 I am using a bépo keymap (http://bepo.fr) and seeking the perfect vim mapping. So far I used a long list of noremap, but for many binding (for exemple, the motion aw or Ctrl + r ), the first keystroke is well remaped but not the others, I reckon it's the expected behaviour, but then this is not what I need. Ideally I would have my keyboard totally remaped in a higher level (before the map commands) except when typing text (in insertion mode and when typing a substitution for exemple). What I

Intellij comment shortcut opens help tab on the Mac menu bar

瘦欲@ 提交于 2019-12-08 14:47:03
问题 When I use the Cmd + Shift + / keyboard shortcut to comment / uncomment a block of code, the Help tab on the menu bar in IntelliJ also opens. Does anyone know how to prevent this shortcut from opening the Help menu tab in IntelliJ 16.1.2 ? I am using the Mac OS X 10.5+ shortcuts. 回答1: Remove or replace the Cmd + Shift + / shortcut in your mac. Apple menu-> System Preferences-> Keyboard -> Shortcuts. 回答2: I used this work around but it didn't fix the problem: In IntelliJ, I went to Preferences

creating sticky key mappings in vim

我与影子孤独终老i 提交于 2019-12-07 09:38:03
问题 I have this in my vimrc file nnoremap <leader>k <C-u> I want to be able to continue to hold down the leader key, and just tap 'k' to scroll the screen as I like. But, at the moment, I have to release both keys first, and then press them again to get the desired action. How do I implement it, so that I don't have to keep releasing the leader key to get the functionality to work? Cheers. 回答1: TinyMode is a plugin that pretty much achieves what you're looking for. You could set it up so that you

Change “Next File” and “Previous File” shortcut in Sublime Text 2

江枫思渺然 提交于 2019-12-05 03:32:48
I'm having no luck changing the key bindings for switching files in Sublime. Does anybody know that the deal is here? All i'm trying to achieve is cmd+] and cmd+[ to show next and previous files. Then i can use tab and shift+tab for all my indenting. [ { "keys": ["super+]"], "command": "Next File" }, { "keys": ["super+["], "command": "Previous File" } ] Thanks everyone! Try this: [ { "keys": ["ctrl+]"], "command": "next_view" }, { "keys": ["ctrl+["], "command": "prev_view" } ] Of course this goes into the "Key Bindings - User" file. This is actually what you might have been really looking for.