terryma / vim-expand-region

Vim plugin that allows you to visually select increasingly larger regions of text using the same key combination.
MIT License
1.1k stars 46 forks source link

Proper settings for Python #15

Open RadoRado opened 8 years ago

RadoRado commented 8 years ago

Hello there,

Can someone help me & possibly add this to the documentation - what should be the proper settings for visual expansion in Python?

Right now does not respect indentation and the visual expanding is not always correct.

RadoRado commented 8 years ago

After a bit of a struggle, with this: https://github.com/bps/vim-textobj-python and the following settings:

call expand_region#custom_text_objects('python', {
      \ 'af' :1,
      \ 'if' :1,
      \ 'ac' :1,
      \ 'ic' :1,
      \ })

I managed to get some desired results.