vim - Text einfügen und die leidigen Einrückungen
Hallo,
wenn ich C/C++ Code mit vim editiere, schätze ich den Einrückungsmodus
sehr. Wenn ich aus dem einen Terminal mit vim in ein anderes Terminal
mit vim kopiere, mache ich das mit Shift-Ctrl-C und Shift-Ctrl-V oder
mit der Maus.
Jetzt nervt mich die Geschichte, weil ich diesen verdammten
Einrückungsmodus nicht mal eben mit ":set nosmartindent" ausschalten
kann. Der Modus bleibt einfach immer aktiv.
Auch die Tips von http://vim.wikia.com/wiki/How_to_stop_auto_indenting
haben nicht geholfen!
Woran kann das liegen?
Ich freue mich, wenn hier ein vim-Liebhaber hilft!
Ein Teil meiner vimrc:
set nocompatible
filetype plugin on
filetype indent on
"syntax enable
"syntax on
set backupdir =$HOME/.vim/backupdir
set
dictionary=$HOME/.vim/wordlists/german.list;$HOME/.vim/wordlists/c-c++-keywords.list
set autoindent " copy indent from current line
set autoread " read open files again when changed
outside Vim
set autowrite " write a modified buffer on each :next
, ...
set backspace=indent,eol,start " backspacing over everything in insert mode
set backup " keep a backup file
set browsedir=current " which directory to use for the file
browser
set complete+=k " scan the files given with the
'dictionary' option
set history=50 " keep 50 lines of command line history
set hlsearch " highlight the last used search pattern
" set incsearch " do incremental searching
set listchars=tab:>.,eol:\$ " strings to use in 'list' mode
" set mouse=a " enable the use of the mouse
set nowrap " do not wrap lines
set popt=left:8pc,right:3pc " print options
set ruler " show the cursor position all the time
set shiftwidth=4 " number of spaces to use for each step
of indent
set showcmd " display incomplete commands
set smartindent " smart autoindenting when starting a
new line
set tabstop=4 " number of spaces that a <Tab> counts for
set expandtab " use spaces instead of tab chars
"set number " Zeilennummern
set t_Co=256
set visualbell " visual bell instead of beeping
set wildignore=*.bak,*.o,*.e,*~ " wildmenu: ignore these extensions
set wildmenu " command-line completion in an enhanced
mode
if has("autocmd")
autocmd BufEnter * :lchdir %:p:h
endif
set background=dark
colorscheme blue
Reply to: