Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-10367

FakeVim text is aligned different compared to text written in normal editor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • Qt Creator 2.8.1
    • Editors, FakeVim
    • Ubuntu 12.04
      Qt Creator 2.8.1 based on Qt 4.8.4 (GCC 4.6.1, 64 bit) from revision c3ed746c24

    Description

      Autoindentation with FakeVim does not appear to be aligning the text the same way as when tabbing text that was written the normal editor.

      See the attached screenshot for a detailed look at the problem. The if was created after the alarmManager.addAlarm line. Thus the text went from being

      alarmManager.addAlarm(...)
      

      To become

      variable++;
      if(variable >= 3)
      {
          variable = 3;
          alarmManager.addAlarm(...)
      }
      

      Now this modification was done in fakevim and the variable = 3; line was indented using FakeVims autoindentation, while I added a manual tab in front of the alarmManager line. These 2 lines should align perfectly above and below each other but they are slightly off relative each other, which can be seen in the screenshot.

      My FakeVim settings are:
      Automatic indentation
      Smart indentation
      Highlight search result
      Show partial command
      Start of line
      Pass keys in insert mode
      Incremental search
      Use wrapscan
      Shift width: 4
      Tabulator size: 4
      Scroll offset: 0
      Backspace: indent,eol,start
      Read .vimrc.

      .vimrc contains the following:
      execute pathogen#infect()
      syntax on
      filetype plugin indent on

      set showcmd
      set cinoptions+=g0
      color wombat256
      set noexpandtab
      set tabstop=4
      set shiftwidth=4

      let g:NERDTreeWinPos = "right"
      "let Tlist_Auto_Open = 1

      nmap <silent> <A-Up> :wincmd k<CR>
      nmap <silent> <A-Down> :wincmd j<CR>
      nmap <silent> <A-Left> :wincmd h<CR>
      nmap <silent> <A-Right> :wincmd l<CR>
      nmap <silent> <C-A-Left> :tabprevious<CR>
      nmap <silent> <C-A-Right> :tabnext<CR>

      map ö ^
      map Ö 0

      inoremap kj <esc>

      autocmd VimEnter * NERDTree
      autocmd VimEnter * wincmd p

      nnoremap <silent> <F8> :TlistToggle<CR>

      My text editor behavior settings:
      Tab policy: Tabs only
      Tab size: 4
      Indent size: 4
      Align continuation lines: with regular indent
      Enable automatic indentation
      Backspace indentation: unindents
      Tab key performs auto indent: never
      Clean whitespace
      Clean indentation
      Ensure newline at end of file
      Default encoding: UTF-8
      UTF-8 BOM: Keep if already present
      Enable mouse navigation
      Enable scroll wheel zooming
      Enable built-in camel case navigation

      Attachments

        1. qtbug.png
          15 kB
          Andreas Wass
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            davschul David Schulz
            racuel Andreas Wass
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes