1

I'd like press 'yiw' to copy inner word. It's currently right copy a PHP variable include prefix "$" in my vim configuration. But it don't include prefix "$" in my sublime text 2 vintage mode.

How can i do to let it work currently? And I also don't know how to set this in vim.

JJJ
  • 32,902
  • 20
  • 89
  • 102
ice.niler
  • 13
  • 2

1 Answers1

1

In Sublime, open Preferences -> Settings - User and add the following line to it:

"word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?"

This is the same line taken from the Preferences -> Settings - Default file, only the $ has been removed. While in INSERT MODE, you can now hit CtrlD (or D on OSX) to select the full variable name, including $, then hit CtrlC (or C) to copy. For more useful keyboard shortcuts for selecting words, check out this answer of mine.

Community
  • 1
  • 1
MattDMo
  • 100,794
  • 21
  • 241
  • 231