# gvim 常见操作 **Published by:** [Tinychenlin](https://paragraph.com/@cryptometaman/) **Published on:** 2021-12-02 **URL:** https://paragraph.com/@cryptometaman/gvim ## Content 1.文件编码操作UTF-8 转 ANSI: set encoding : set encoding=UTF-8 : set fileencoding=cp936 : wq! ANSI 转UTF-8: set encoding : set fileencoding=UTF-8 : wq! 2.显示设置$ gvim ~/.vimrc set nu! set hlsearch syntax enable syntax on colorscheme desert set autoindent set smartindent set tabstop=4 set expandtab set softtabstop=4 set foldmethod=indent syntax on set fileencodings=utf-8,gbk2312,gbk,gb18030,cp936 set encoding=utf-8 set langmenu=zh_CN let $LANG = 'en_US.UTF-8' set nocompatible set nobackup set noswapfile set history=1024 set autochdir ## Publication Information - [Tinychenlin](https://paragraph.com/@cryptometaman/): Publication homepage - [All Posts](https://paragraph.com/@cryptometaman/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@cryptometaman): Subscribe to updates