Raimondi / delimitMate

Vim plugin, provides insert mode auto-completion for quotes, parens, brackets, etc.
http://www.vim.org/scripts/script.php?script_id=2754
1.98k stars 117 forks source link

delimitMate and SmartTabs do not work together in C files #91

Closed knl closed 12 years ago

knl commented 12 years ago

Hi, when I have delimitMate enabled, Smart Tabs plugin does not work. When delimitMate is enabled I have two issues. I will report them separately.

If SmartTabs is also enabled, weird things happen if I press <CR>. Instead of seeing:

if (test) {
|}

I see:

if (test) {
}|

I'm using the latest dM (0b34aea). This may not be a problem of dM, but I wanted to report it.

The output of :delimitMateTest is:

delimitMate Report
==================

* Options: ( ) default, (g) global, (b) buffer

( ) delimitMate_apostrophes = ''
( ) delimitMate_autoclose = 1
( ) delimitMate_balance_matchpairs = 0
( ) delimitMate_excluded_ft = ''
( ) delimitMate_excluded_regions = 'Comment'
(g) delimitMate_expand_cr = 1
(g) delimitMate_expand_space = 1
( ) delimitMate_matchpairs = '(:),{:},[:]'
( ) delimitMate_nesting_quotes = []
( ) delimitMate_quotes = '" '' `'
( ) delimitMate_smart_matchpairs = '^\%(\w\|\!\|£\|\$\|_\|["'']\s*\S\)'
( ) delimitMate_smart_quotes = 1
--------------------

* Mappings:

i  )            @<Plug>delimitMate)
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  }            @<Plug>delimitMate}
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  ]            @<Plug>delimitMate]
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  (            @<Plug>delimitMate(
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  {            @<Plug>delimitMate{
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  [            @<Plug>delimitMate[
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  "            @<Plug>delimitMate"
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  '            @<Plug>delimitMate'
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  `            @<Plug>delimitMate`
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  <BS>        *@<SNR>79_DoSmartDelete()."\<BS>"
    Last set from ~/work/dotvim/bundles/smarttabs/plugin/ctab.vim
i  <S-BS>       @<Plug>delimitMateS-BS
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  <Del>        @<Plug>delimitMateDel
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  <S-Tab>     * <C-R>=BackwardsSnippet()<CR>
    Last set from ~/work/dotvim/bundles/snipmate/after/plugin/snipMate.vim
i  <Esc>        @<Plug>delimitMateEsc
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
!  <Up>        * <Esc>
    Last set from ~/.vimrc
!  <Down>      * <Esc>
    Last set from ~/.vimrc
i  <Left>      * <Esc>
    Last set from ~/.vimrc
i  <Right>     * <Esc>
    Last set from ~/.vimrc
i  <LeftMouse>  @<Plug>delimitMateMLeftMouse
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  <RightMouse>  @<Plug>delimitMateMRightMouse
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  <Home>       @<Plug>delimitMateHome
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  <End>        @<Plug>delimitMateEnd
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  <PageUp>     @<Plug>delimitMatePageUp
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  <PageDown>   @<Plug>delimitMatePageDown
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  <S-Down>     @<Plug>delimitMateS-Down
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  <S-Up>       @<Plug>delimitMateS-Up
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  <C-G>g       @<Plug>delimitMateJumpMany
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
i  <CR>        *@<SNR>79_CheckCR()
    Last set from ~/work/dotvim/bundles/smarttabs/plugin/ctab.vim
i  <CR>        * <C-R>=<SNR>82_SelectCompletion(1)<CR>
    Last set from ~/work/dotvim/bundles/supertab/plugin/supertab.vim
i  <Space>      @<Plug>delimitMateSpace
    Last set from ~/work/dotvim/bundles/delimitMate/plugin/delimitMate.vim
--------------------

* Showcase:

Open: (|)
Delete: |)
Exit: ()|
Space: ( | )
Delete space: (| )
Car return: (
    )|
Delete car return: (
|

Open: {|}
Delete: |}
Exit: {}|
Space: { | }
Delete space: {| }
Car return: {
}|
Delete car return: {
|

Open: [|]
Delete: |]
Exit: []|
Space: [ | ]
Delete space: [| ]
Car return: [
]|
Delete car return: [
|

Open: "|"
Delete: |"
Exit: ""|
Space: " | "
Delete space: "| "
Car return: "
"|
Delete car return: "
|

Open: '|'
Delete: |'
Exit: ''|
Space: ' | '
Delete space: '| '
Car return: '
'|
Delete car return: '
|

Open: `|`
Delete: |`
Exit: ``|
Space: ` | `
Delete space: `| `
Car return: `
`|
Delete car return: `
|
knl commented 12 years ago

I realize that this, and the other issue might be due to SuperTab. I will report the other one there.

Raimondi commented 12 years ago

OK. I'll close this issue, then.