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

Not able to filter multiple items from a list in vim
It is possible to set color columns with different values in vim?
How to ignore case in Vim's `:find` command?
Copying all text to a new tab or buffer in vim
VIM listchars except nerdtree
search vim using utf-8 code
vim plugin not working: schlepp
Tab a text block in vim with mswin
What is the correct way in Vim to autocommand “:highlight” after a buffer is loaded?
Nerdcomment {% comment%} … {% endcomment %}
vim open existing files
Toggle absolute and relative numbering in VIM by insert/normal mode
how to sort numbers in even and odd pattern using sort in vim editor
.vimrc ctermbg being overridden
Jump to next tag in pom.xml
How to expand an abbreviated date into a full date?

Categories

HOME
yii2
hook
webpack
plot
session
electron
react-router
kalman-filter
google-docs
razor
amortized-analysis
disassembler
blueprintjs
echarts
circular-dependency
google-static-maps
database-replication
sms-gateway
jprofiler
kryo
object-detection
functional-testing
kvc
restful-authentication
icloud-api
neo4j-spatial
wtx
libuv
objectanimator
primitive
key-value-observing
phonegap
catch-all
framemaker
fusionpbx
stacked
restlet
temporary-files
hp-ux
jvm-languages
ibpy
sas-jmp
websphere-mq-fte
pnotify
boost-multi-index
datastax-startup
tropo
statsd
snmptrapd
dtexec
epson
imanage
dynamics-sl
cubes
setuptools
heidisql
rotativa
adxstudio-portals
file-writing
login-control
thrust
hill-climbing
php-parse-error
revolution-r
independentsoft
ford-fulkerson
collapse
cyclomatic-complexity
kcachegrind
0xdbe
microbenchmark
interrupted-exception
apache-commons-fileupload
directoryservices
system.reflection
device-manager
heisenbug
seaside
kgdb
app42
message-driven-bean
imdbpy
c18
oam
access-rights
dexterity
itmstransporter
mt
regsvr32
html-input
gamequery
dmx512
sproutcore-2
dentrix
filtered-index
dbal
mirah
user-friendly
brewmp
boost-smart-ptr
port-number
mediarss

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App