vim


My terminal's indentation is not working properly


I am mac user. When I'm using Vim in the termianl autoindent does not work at all.
Indentation only works when I tab in manually, through next line.
I already apply autoindent, cindent like that. Here is my .vimrc code. I really need your help.
1 " 환경설정
2 syntax on
3
4 set nu
5 set hi=100
6 set ru
7 set mps+=<:>
8 set backup
9 syntax enable
10 colorscheme desert
11 set history=50
12 set visualbell
13 set noerrorbells
14 set loadplugins
15
16 set encoding=utf-8
17 set fileencodings=utf-8,cp949,default,latinl
18 set termencoding=utf-8
19 set printencoding=utf-8
20 set printmbcharset=ISO10646
21
22 " Editing
23 set paste
24 set tabstop=4
25 set softtabstop=4
26 set shiftwidth=4
27 set showmatch
28 set autowrite
29 set autoindent
30 set cursorline
31 set showcmd "show commandline
32 set title "show title
33 set statusline=\ %<%l:%v\ [%P]%=%a\ %h%m%r\ %F\ " 다중 문서 작업을 >>
위한 Status 줄
34 set km=startsel,stopsel "shift키로 선택 영역 만들기 허용
35 " 영역 상태에서 ctrl+f, b 로 이동하면 영역 해제
36
37 set smartindent
38 set expandtab
39 set cindent
40 set autoindent
41 set textwidth=80 " if it is over 80 char
42 set wrap " then it warped next line
43 set nobackup
44 set shiftwidth=4 "autoindent at 4 line
45 set ignorecase " no large-small character difference when it is searched
46 set laststatus=2
47
48 " window
49 set ruler "show cursor position
50
51 " macro
52 map <F2> :tabnew<CR>
53 map <F4> :w<CR>
54
55 " c 파일의 경우 Makefile이 없으면 gcc를 불러줌
56 au BufRead,BufNewFile *.c
57 \ if !filereadable("Makefile") && !filereadable("makefile") |
58 \ set makeprg=gcc\ %\ -o\ %< |
59 \ endif
60
61 " cpp 파일의 경우 Makefile 이 없으면 g++를 불러줌
62 au BufRead,BufNewFile *.cpp
63 \ if !filereadable("Makefile") && !filereadable("makefile") |
64 \ set makeprg=g++\ %\ -o\ %< |
65 \ endif
66
67 " java 파일의 경우 Makefile 이 없으면 javac를 불러줌
68 au BufRead,BufNewFile *.java
69 \ if !filereadable("Makefile") && !filereadable("makefile") |
70 \ set makeprg=javac\ % |
71 \ endif
72
73 " 지난번 편집했던 곳으로 Jump
74 au BufReadPost *
75 \ if line("'\"") > 0 && line("'\"") <= line("$") |
76 \ exe "normal g`\"" |
77 \ endif
Remove set paste. Paste mode will effectively disable indentation.

Related Links

Go to back directory browsing after opening file in vim
How do I change the boundaries of symbols used/detected in Vim omni completion?
Is it possible to have vertical rather than horizontal GTK tabs in gvim?
Change behaviour of mapping in certain cases, and reuse functionality in all others
VIM Command-T plugin: how to build the cache index in silent mode at startup?
Easy typing for non-english keyboards vim users [closed]
vim iabbrev S to self
Vim and GVim: leader key not working
Quickest Way to Revert Spaces to TABs in VIM
How to autocomplete c or c++ keywords in vim
Odd behavior of backspace in Vim (SSH to Linux from Mac)
Indent multiple lines above the cursor in Vim
vimscript using another file instead of .viminfo
Autocomplete of OpenCV functions with Vim
Set MacVim default font
vim nerd commenter range command

Categories

HOME
yii2
comparison
layout
yahoo-oauth
disassembler
serverspec
acquia
opengl-es-2.0
indesign
maude-system
facebook-php-sdk
spring-xd
floating-action-button
numeral.js
nstableview
usergrid
visual-studio-2005
ibm-odm
try-catch
systemc
libtiff
tostring
jsdoc
http-status-code-504
pythonanywhere
plunker
nas
autoconf
clickonce
jasonette
physics-engine
buildbot
qhull
subdomains
flink-streaming
xquery-3.0
fog
hybridauth
rotational-matrices
bytecode-manipulation
sharefile
jna
android-tabhost
http-redirect
s
thin
qwt
upstart
zip4j
domain-model
lowpass-filter
slickedit
crypt
libusb-win32
capacity
flow-control
lync-client-sdk
chord-diagram
bonobo
pcf
multiple-regression
hill-climbing
sdf
livequery
nessus
php-internals
pervasive-sql
cakephp-3.1
ideamart
appfabric-cache
e10s
directoryservices
geonetwork
wordpress-theme-customize
internet-connection
google-reader
has-many-through
android-2.2-froyo
terminal-services
mysqltuner
soundtouch
ruby-datamapper
ora-00911
jquery-mobile-dialog
flashvars
delphi-6
referrer
path-separator
hosts-file
nsmanagedobject
jquery-ui-layout
nsdatecomponents
stage
qt-jambi
xtype
servicehost
lang
subviews
nhibernate.search
mirah
asp.net-profiles
ctp4
pascal-fc
project-hosting
putchar
w3wp
3gp
misv

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App