vim的配置文件.vimrc常规配置

【Linux学习笔记day01】vi---终端中的编辑器+vi和vim的区别+可视化+分屏+vimrc文件 文章目录vi —— 终端中的编辑器目标01. `vi` 简介1.1 学习 `vi` 的目的1.2 vi 和 vimvi`vim`查询软连接命令(知道)02. 打开和新建文件2.1 打开文件并且定位行2.2 异常处理03. 三种工作模式末行模式命令04. 常用命令命令线路图学习提示4.1 移动(基本)1) 上、下、左、右2) 行内移动3) 行数移动4) 屏幕移动4.2 移动(程序)1) 段落移动2)... 阅读详情

           使用vim进行编辑时,默认情况下,编辑的界面上是没有显示行号、语法高亮、智能缩进等功能的。如果想让vim具有这些功能,需要手动设置一个配置文件【.vimrc,该文件会保持在用户的根目录下】

先show下我的.vimrc文件:

set nu
set tabstop=4
set shiftwidth=4
syntax on 
"colorscheme wombat
colorscheme desert
set hlsearch
set incsearch
set smartindent
set autoindent
set cursorline
set showmatch  
set ruler
set textwidth=1000
set cindent
set nobackup

filetype on

nmap <F4> :NERDTreeToggle<cr>
nmap <F2> :TlistToggle<cr>
nmap <F12> :Calendar<cr>


nmap <C-k> <C-W>k
nmap <C-j> <C-W>j
nmap <C-h> <C-W>h
nmap <C-l> <C-W>l

let Tlist_Use_Right_Window=1
let Tlist_File_Fold_Auto_Close=0
let Tlist_Exist_OnlyWindow = 1 
let Tlist_Sort_Type = "name"
let Tlist_Compart_Format = 1
let g:winManagerWindowLayout='FileExplorer|TagList'

"let g:miniBufExplMapWindowNavVim = 1
"let g:miniBufExplMapWindowNavArrows = 1
"let g:miniBufExplMapCTabSwitchBufs = 1
"let g:miniBufExplModSelTarget = 1 

" C/C++
map <F5> :call CompileRunGcc5()<CR>
func! CompileRunGcc5()
	exec "!make clean"
	exec "w"
	exec "!make"
	endfunc

" C/C++
map <F7> :call CompileRunGcc7()<CR>
func! CompileRunGcc7()
	exec "w"
	exec "!make"
	endfunc

" Encoding settings
if has("multi_byte")
	" Set fileencoding priority
	if getfsize(expand("%")) > 0
		set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,latin1
	else
		set fileencodings=cp936,big5,euc-jp,euc-kr,latin1
	endif

	" CJK environment detection and corresponding setting
	if v:lang =~ "^zh_CN"
		" Use cp936 to support GBK, euc-cn == gb2312
		set encoding=cp936
		set termencoding=cp936
		set fileencoding=cp936
	elseif v:lang =~ "^zh_TW"
		" cp950, big5 or euc-tw
		" Are they equal to each other?
		set encoding=big5
		set termencoding=big5
		set fileencoding=big5
	elseif v:lang =~ "^ko"
		" Copied from someone's dotfile, untested
		set encoding=euc-kr
		set termencoding=euc-kr
		set fileencoding=euc-kr
	elseif v:lang =~ "^ja_JP"
		" Copied from someone's dotfile, unteste
		set encoding=euc-jp
		set termencoding=euc-jp
		set fileencoding=euc-jp
	endif
	
	" Detect UTF-8 locale, and replace CJK setting if needed
	if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
		set encoding=utf-8
		set termencoding=utf-8
		set fileencoding=utf-8
	endif
endif

当然了,你的配置文件,不用照搬我的,请参阅下网上老外的example【 http://www.vi-improved.org/vimrc.php】:

1 " Modeline and Notes {
  2 "   vim: set foldmarker={,} foldlevel=0 spell:
  3 "
  4 "   This is my personal .vimrc, I don't recommend you copy it, just 
  5 "   use the "   pieces you want(and understand!).  When you copy a 
  6 "   .vimrc in its entirety, weird and unexpected things can happen.
  7 "
  8 "   If you find an obvious mistake hit me up at:
  9 "   http://robertmelton.com/contact (many forms of communication)
 10 " }
 11 
 12 " Basics {
 13     set nocompatible " explicitly get out of vi-compatible mode
 14     set noexrc " don't use local version of .(g)vimrc, .exrc
 15     set background=dark " we plan to use a dark background
 16     set cpoptions=aABceFsmq
 17     "             |||||||||
 18     "             ||||||||+-- When joining lines, leave the cursor 
 19     "             |||||||      between joined lines
 20     "             |||||||+-- When a new match is created (showmatch) 
 21     "             ||||||      pause for .5
 22     "             ||||||+-- Set buffer options when entering the 
 23     "             |||||      buffer
 24     "             |||||+-- :write command updates current file name
 25     "             ||||+-- Automatically add <CR> to the last line 
 26     "             |||      when using :@r
 27     "             |||+-- Searching continues at the end of the match 
 28     "             ||      at the cursor position
 29     "             ||+-- A backslash has no special meaning in mappings
 30     "             |+-- :write updates alternative file name
 31     "             +-- :read updates alternative file name
 32     syntax on " syntax highlighting on
 33 " }
 34 
 35 " General {
 36     filetype plugin indent on " load filetype plugins/indent settings
 37     set autochdir " always switch to the current file directory 
 38     set backspace=indent,eol,start " make backspace a more flexible
 39     set backup " make backup files
 40     set backupdir=~/.vim/backup " where to put backup files
 41     set clipboard+=unnamed " share windows clipboard
 42     set directory=~/.vim/tmp " directory to place swap files in
 43     set fileformats=unix,dos,mac " support all three, in this order
 44     set hidden " you can change buffers without saving
 45     " (XXX: #VIM/tpope warns the line below could break things)
 46     set iskeyword+=_,$,@,%,# " none of these are word dividers 
 47     set mouse=a " use mouse everywhere
 48     set noerrorbells " don't make noise
 49     set whichwrap=b,s,h,l,<,>,~,[,] " everything wraps
 50     "             | | | | | | | | |
 51     "             | | | | | | | | +-- "]" Insert and Replace
 52     "             | | | | | | | +-- "[" Insert and Replace
 53     "             | | | | | | +-- "~" Normal
 54     "             | | | | | +-- <Right> Normal and Visual
 55     "             | | | | +-- <Left> Normal and Visual
 56     "             | | | +-- "l" Normal and Visual (not recommended)
 57     "             | | +-- "h" Normal and Visual (not recommended)
 58     "             | +-- <Space> Normal and Visual
 59     "             +-- <BS> Normal and Visual
 60     set wildmenu " turn on command line completion wild style
 61     " ignore these list file extensions
 62     set wildignore=*.dll,*.o,*.obj,*.bak,*.exe,*.pyc,
 63                     \*.jpg,*.gif,*.png
 64     set wildmode=list:longest " turn on wild mode huge list
 65 " }
 66 
 67 " Vim UI {
 68     set cursorcolumn " highlight the current column
 69     set cursorline " highlight current line
 70     set incsearch " BUT do highlight as you type you 
 71                    " search phrase
 72     set laststatus=2 " always show the status line
 73     set lazyredraw " do not redraw while running macros
 74     set linespace=0 " don't insert any extra pixel lines 
 75                      " betweens rows
 76     set list " we do what to show tabs, to ensure we get them 
 77               " out of my files
 78     set listchars=tab:>-,trail:- " show tabs and trailing 
 79     set matchtime=5 " how many tenths of a second to blink 
 80                      " matching brackets for
 81     set nohlsearch " do not highlight searched for phrases
 82     set nostartofline " leave my cursor where it was
 83     set novisualbell " don't blink
 84     set number " turn on line numbers
 85     set numberwidth=5 " We are good up to 99999 lines
 86     set report=0 " tell us when anything is changed via :...
 87     set ruler " Always show current positions along the bottom
 88     set scrolloff=10 " Keep 10 lines (top/bottom) for scope
 89     set shortmess=aOstT " shortens messages to avoid 
 90                          " 'press a key' prompt
 91     set showcmd " show the command being typed
 92     set showmatch " show matching brackets
 93     set sidescrolloff=10 " Keep 5 lines at the size
 94     set statusline=%F%m%r%h%w[%L][%{&ff}]%y[%p%%][%04l,%04v]
 95     "              | | | | |  |   |      |  |     |    |
 96     "              | | | | |  |   |      |  |     |    + current 
 97     "              | | | | |  |   |      |  |     |       column
 98     "              | | | | |  |   |      |  |     +-- current line
 99     "              | | | | |  |   |      |  +-- current % into file
100     "              | | | | |  |   |      +-- current syntax in 
101     "              | | | | |  |   |          square brackets
102     "              | | | | |  |   +-- current fileformat
103     "              | | | | |  +-- number of lines
104     "              | | | | +-- preview flag in square brackets
105     "              | | | +-- help flag in square brackets
106     "              | | +-- readonly flag in square brackets
107     "              | +-- rodified flag in square brackets
108     "              +-- full path to file in the buffer
109 " }
110 
111 " Text Formatting/Layout {
112     set completeopt= " don't use a pop up menu for completions
113     set expandtab " no real tabs please!
114     set formatoptions=rq " Automatically insert comment leader on return, 
115                           " and let gq format comments
116     set ignorecase " case insensitive by default
117     set infercase " case inferred by default
118     set nowrap " do not wrap line
119     set shiftround " when at 3 spaces, and I hit > ... go to 4, not 5
120     set smartcase " if there are caps, go case-sensitive
121     set shiftwidth=4 " auto-indent amount when using cindent, 
122                       " >>, << and stuff like that
123     set softtabstop=4 " when hitting tab or backspace, how many spaces 
124                        "should a tab be (see expandtab)
125     set tabstop=8 " real tabs should be 8, and they will show with 
126                    " set list on
127 " }
128 
129 " Folding {
130     set foldenable " Turn on folding
131     set foldmarker={,} " Fold C style code (only use this as default 
132                         " if you use a high foldlevel)
133     set foldmethod=marker " Fold on the marker
134     set foldlevel=100 " Don't autofold anything (but I can still 
135                       " fold manually)
136     set foldopen=block,hor,mark,percent,quickfix,tag " what movements
137                                                       " open folds 
138     function SimpleFoldText() " {
139         return getline(v:foldstart).' '
140     endfunction " }
141     set foldtext=SimpleFoldText() " Custom fold text function 
142                                    " (cleaner than default)
143 " }
144 
145 " Plugin Settings {
146     let b:match_ignorecase = 1 " case is stupid
147     let perl_extended_vars=1 " highlight advanced perl vars 
148                               " inside strings
149 
150     " TagList Settings {
151         let Tlist_Auto_Open=0 " let the tag list open automagically
152         let Tlist_Compact_Format = 1 " show small menu
153         let Tlist_Ctags_Cmd = 'ctags' " location of ctags
154         let Tlist_Enable_Fold_Column = 0 " do show folding tree
155         let Tlist_Exist_OnlyWindow = 1 " if you are the last, kill 
156                                         " yourself
157         let Tlist_File_Fold_Auto_Close = 0 " fold closed other trees
158         let Tlist_Sort_Type = "name" " order by 
159         let Tlist_Use_Right_Window = 1 " split to the right side
160                                         " of the screen
161         let Tlist_WinWidth = 40 " 40 cols wide, so i can (almost always)
162                                  " read my functions
163         " Language Specifics {
164             " just functions and classes please
165             let tlist_aspjscript_settings = 'asp;f:function;c:class' 
166             " just functions and subs please
167             let tlist_aspvbs_settings = 'asp;f:function;s:sub' 
168             " don't show variables in freaking php
169             let tlist_php_settings = 'php;c:class;d:constant;f:function' 
170             " just functions and classes please
171             let tlist_vb_settings = 'asp;f:function;c:class' 
172         " }
173     " }
174 " }
175 
176 " Mappings {
177     " ROT13 - fun
178     map <F12> ggVGg?
179 
180     " space / shift-space scroll in normal mode
181     noremap <S-space> <C-b>
182     noremap <space> <C-f>
183 
184     " Make Arrow Keys Useful Again {
185         map <down> <ESC>:bn<RETURN>
186         map <left> <ESC>:NERDTreeToggle<RETURN>
187         map <right> <ESC>:Tlist<RETURN>
188         map <up> <ESC>:bp<RETURN>
189     " }
190 " }
191 
192 " Autocommands {
193     " Ruby {
194         " ruby standard 2 spaces, always
195         au BufRead,BufNewFile *.rb,*.rhtml set shiftwidth=2 
196         au BufRead,BufNewFile *.rb,*.rhtml set softtabstop=2 
197     " }
198     " Notes {
199         " I consider .notes files special, and handle them differently, I
200         " should probably put this in another file
201         au BufRead,BufNewFile *.notes set foldlevel=2
202         au BufRead,BufNewFile *.notes set foldmethod=indent
203         au BufRead,BufNewFile *.notes set foldtext=foldtext()
204         au BufRead,BufNewFile *.notes set listchars=tab:\ \ 
205         au BufRead,BufNewFile *.notes set noexpandtab
206         au BufRead,BufNewFile *.notes set shiftwidth=8
207         au BufRead,BufNewFile *.notes set softtabstop=8
208         au BufRead,BufNewFile *.notes set tabstop=8
209         au BufRead,BufNewFile *.notes set syntax=notes
210         au BufRead,BufNewFile *.notes set nocursorcolumn
211         au BufRead,BufNewFile *.notes set nocursorline
212         au BufRead,BufNewFile *.notes set guifont=Consolas:h12
213         au BufRead,BufNewFile *.notes set spell
214     " }
215     au BufNewFile,BufRead *.ahk setf ahk 
216 " }
217 
218 " GUI Settings {
219 if has("gui_running")
220     " Basics {
221         colorscheme metacosm " my color scheme (only works in GUI)
222         set columns=180 " perfect size for me
223         set guifont=Consolas:h10 " My favorite font
224         set guioptions=ce 
225         "              ||
226         "              |+-- use simple dialogs rather than pop-ups
227         "              +  use GUI tabs, not console style tabs
228         set lines=55 " perfect size for me
229         set mousehide " hide the mouse cursor when typing
230     " }
231 
232     " Font Switching Binds {
233         map <F8> <ESC>:set guifont=Consolas:h8<CR>
234         map <F9> <ESC>:set guifont=Consolas:h10<CR>
235         map <F10> <ESC>:set guifont=Consolas:h12<CR>
236         map <F11> <ESC>:set guifont=Consolas:h16<CR>
237         map <F12> <ESC>:set guifont=Consolas:h20<CR>
238     " }
239 endif
240 " }

其他参考网址:

http://www.vim.org/

http://vimcdoc.sourceforge.net/

掌握vi编辑器:.vimrc配置文件详解 本文还有配套的精品资源,点击获取 简介:Linux和Unix-like系统的 vi 编辑器及其增强版 vim 在文本编辑领域广受欢迎。 .vimrc 配置文件是用户自定义 vim 行为的关键,允许用户通过一系列命令行设置编辑器的外观、快捷键、自动缩进和智能补全等。熟练掌握 .vimrc 的定制,可使用户在... 阅读详情

相关推荐

定制VIM体验:全面的`.vimrc`配置指南

本文还有配套的精品资源,点击获取 简介:VIM是一个受到广泛喜爱的文本编辑器,其强大功能可以通过 .vimrc 配置文件进行个性化定制。本文将深入介绍 .vimrc 配置文件中的关键设置,包括基本编辑行为、颜色主题、快捷键映射、文件类型识别、自动缩进、插件管理、搜索替换、文本对象选择、缓冲区和窗口管理、自动完成、状态栏、备份和交换文件、撤销分支、...

weixin_42163404的博客 4067

vim配置vimrc详解(转)

vimrc的存放位置:系统vimrc文件:"$VIM/vimrc"用户vimrc文件:"$HOME/.vimrc"用户exrc文件:"$HOME/.exrc"系统gvimrc文件:"$VIM/gvimrc"用户gvimrc文件:"$HOME/.gvimrc"系统菜单文件:"$VIMRUNTIME/menu.vim"$VIM预设值:...

weixin_34268579的博客 1957

STM32 HAL 模拟I2C从机实战:软件实现与多设备通信优化

本文详细介绍了STM32 HAL库下软件模拟I2C从机的实现方法,包括GPIO开漏配置、基础信号实现、数据收发函数编写和多设备通信优化策略。通过灵活的软件模拟方案,解决了硬件I2C接口数量限制和稳定性问题,为多传感器数据采集等应用提供了可靠的通信保障。

motor的博客 912

04 .vimrc文件配置

;本文适合在linux环境下,进行verilog 代码开发时,对vim用户配置文件“.vimrc”进行编写,配置vim编辑器语法高亮、文件类型检测、显示行号、括号匹配、tab缩进和==调用别名文件==等,可提高设计开发的效率。...

毕淑敏曾说过:“我不相信命运,我只相信自己的手;我不相信手掌上的纹路,但我相信手指加上手掌的力量”。在这个快节奏的社会,只有自己能力不足才会被卷,踏踏实实沉下心来学一些技术,及时记录,方便以后复盘。 4万+

可变形卷积(Deformable Conv)原理解析与torch代码实现

图6为可变形卷积示意图。图1所示为普通卷积在输入特征图上进行卷积计算的过程,卷积核大小为3*3,在输入特征图尺寸为7*7上进行卷积,将卷积核权重与输入特征图对应位置元素相乘并求和得到输出特征图元素,按一定方式滑动窗口就能计算得到整张输出特征图。图6所示,在input feature map上普通卷积操作对应卷积采样区域是一个卷积核大小的正方形(绿框),而可变形卷积对应的卷积采样区域为一些蓝框表示的点,这就是可变形卷积与普通卷积的区别。先来一张图感受一下,图3为标准卷积与可变形卷积的卷积示例。

panghuzhenbang的博客 5万+

UE 顶点动画工具 (VAT)

导入模型需要勾选全精度UV。

iesoxj的博客 1640

linux入门---vim的配置

这篇文章将教会你如何配置好一个好用的vim,

qq_68695298的博客 6956

第十二节:C#工业控制编程基础--输出正弦波实验

第十二节:基于c#使用开发板输出正弦波实验 文章目录第十二节:基于c#使用开发板输出正弦波实验一、实验目的:了解采集卡DA相关函数的使用。二、实验内容:利用C#生成正弦波,然后用采集卡DA输出。三、实验步骤:1.打开Visual Studio 2013,新建窗体应用程序项目,配置好板卡dll文件。2.在窗体中放入控件,对控件进行布局排版,并修改他们的Name属性和Text属性。3.在Chart控件内选择Spline型图表,如图2。4.进入编程区域,在public partial class Form1 :

weixin_49237052的博客 2295

Mac OS搞定vim的安装与配置(C++算法选手篇)

step one 首先需要的是安装包 这个默认已经有了 step two 运行Mac版本的安装包,是以.dmg为后缀的安装文件,和日常的Mac软件安装一样,拖拽安装就行了,安装好后在启动台和访达(应用程序)里可以找到。 step three 关于配置文件 重头戏来了!!! 相比于Windows系统配置环境更加简单!(good news) 但是配置文件这里有些因为系统原因有些小细节需要注意。 众所周知vim最重要的是vimrc这个文本文件,安装包里面肯定有这个配置文件的,但是呢,不同于win10系统,这个文件

FOWng_lp的博客 1292

PC 端微信页面拆分及 JavaFx 使用

一、前言 对于一个知识点的学习过程来说,往往使用自己熟悉的工具或方式才更易于上手。因为所有同类型的知识点在抛出复杂的流程拨云见日后,所能得到的几乎都是同样的设计思想和实现理论。 在 Java 语言桌面版开发中,直至目前共提供了三套 UI 开发方式;Awt、Swing、JavaFx,以及一些扩展组件 SWT 等。在这三套 UI 组件中,JavaFx 是最新也是最为好用的,因为他提供了丰富的功能,以及...

bugstack虫洞栈 3606

C/C++炫酷烟花①(完整代码)

C/C++实现炫酷烟花动画的完整代码。

AIGC 2万+

vimrc有哪些配置?

文件是 Vim 编辑器的配置文件,它允许用户定义全局设置、映射键位、使用插件等。该文件位于用户的主目录中,对于 Unix 系统通常是。配置是高度个性化的,每个用户都可以根据自己的需要和喜好来定制 Vim 的行为。中可以设置的一小部分选项。,在 Windows 系统中是。可以查看所有可用的设置选项。

m0_57236802的博客 403

使用MiniExcel.SaveAsByTemplate快速地保存百万数据

该代码展示了如何使用MiniExcel快速生成并导出百万级销售数据。核心方法GenerateLargeData()可生成指定数量的随机销售记录,包含客户名、日期、VIP状态、积分等20个字段。通过随机函数模拟真实数据分布,并支持自定义数据量(默认100万条)。配合Excel模板使用MiniExcel.SaveAsByTemplate()方法,能高效地将大数据量导出为Excel文件,且处理速度极快。代码结构清晰,包含数据生成、随机日期辅助方法和数据模型类,适合需要批量生成测试数据或导出大型报表的场景。

大坡3D软件开发 253

vim配置文件vimrc的部分内容解析

【代码】vim配置文件vimrc的部分内容解析。

m0_64563956的博客 261

uniapp(安卓 | 苹果) - 最新详细实现App打包发布教程,uni-app苹果IOS软件应用上架App Store软件商店,uni-app打包发布安卓Android软件到各大应用商店(详细教程

uni-app,安卓android,苹果ios,uniapp App软件,Uniapp上架发布应用,打包构建,apk、app软件,应用商店,应用市场,app store,uni-app安卓苹果app上架应用商店,app应用从创建到上架_uniapp打包app的流程和上架,uniapp打包上架ios Appstore 最全流程,苹果应用商店上架教程,uniapp生成的app怎么上架到iphone的app store,uni-app打包到上架Android , ios完整详细流程,审核一直不通过,软件商店审核失

✅ 精选推荐文章 1万+

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

vim自定义设置-配置文件

http://blog.csdn.net/pipisorry/article/details/25056909 .vimrc配置文件表示说明 vim自定义键盘映射使用:map命令,可以将键盘上的某个按键与Vim的命令绑定起来。例如使用以下命令,可以通过F5键将单词用花括号括起来: :ma...

chuange6363的博客 198

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

强悍的 Vim —— .vimrc(vim 配置文件)

1. 设置括号自动补全在 ~/.vimrc 文件的末尾添加如下内容:inoremap ( ()<ESC>i inoremap [ []<ESC>i inoremap { {}<ESC>i inoremap < <><ESC>i

1172

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

在vimrc中设置record

在vimrc中设置record Vim的record功能在大量重复操作的场景下非常实用,但是,一般我们都要每次进入Vim时重新录制record。而对于一些非常常用的record,我们想让它永久地保持,我们知道这种需求需要借助Vim的配置文件vimrc。但是具体怎么操作呢,笔者在走了一些弯路之后将设置方法记录下来,希望能对大家有帮助。 我们以添加 Python 单行注释为例,这需要我们在每一行前面添加:#。 录制record的方法我们已经比较熟悉了,不熟悉的同学可参考:Vim 重复操作的宏录制。 我们知道Vi

weixin_44966641的博客 575

YCM nodejs vim-plugin + vim 常规配置

1.cmake安装 a) 下载cmake curl -o cmake-3.7.0-rc2-Linux-x86_64.tar.gz  https://cmake.org/files/v3.7/cmake-3.7.0-rc2-Linux-x86_64.tar.gz b)解压文件 tar zxvf cmake-3.7.0-rc2-Linux-x86_64.tar.gz  c)创建链接

njjackzhong的专栏 1702

vim在.vimrc里配置快捷键

前缀键 前缀键。各类 vim 插件帮助文档中经常出现 ,即,前缀键。vim 自带有很多快捷键,再加上各类插件的快捷键,大量快捷键出现在单层空间中难免引起冲突,为缓解该问题,引入了前缀键 ,这样,键 r 可以配置成 r、r、r 等等多个快捷键。前缀键是 vim 使用率较高的一个键(最高的当属 Esc),选一个最方便输入的键作为前缀键,将有助于提高编辑效率。找个无须眼睛查找、无须移动手指的键 ——

ghostyusheng 's blog 4408

Ubuntu下VIM新手必知的5个高效操作技巧(附.vimrc配置)

本文为Ubuntu系统下的VIM新手提供了5个高效操作技巧,包括基础生存指南、光标移动、文本操作、搜索替换和多文件编辑等实用功能,并附带了优化的.vimrc配置文件。这些技巧能显著提升开发效率,帮助用户快速掌握VIM这一强大的文本编辑器。

xxx12的博客 874

Linux vimrc常见配置

code 效果 set ignorecase 搜索模式里忽略大小写 set nu 设置vim显示代码行 set smartcase 如果搜索模式包含大写字符,不使用 ‘ignorecase’ 选项。只有在输入搜索模式并且打开 ‘ignorecase’ 选项时才会使用 set autowrite 自动把内容写回文件也就是自动保存 set autoindent 设置自动对齐(缩进):即每行的缩进值与上一行相等;使用 noautoindent 取消设置 set smartind...

qq_42931917的博客 2208

vim 常见操作

vimrc是vim的配置文件,vim编辑器相关的所有功能开关都可以通过.vimrc文件进行设置。备注:文件名中的 “rc” 是出自 “run commands”。最初的源头是麻省理工学院在 1965 年发展的 CTSS系统,其中有一个从档案中取出一系列命令来执行的功能,其被称为 run commands,这种档案又称为一个runcom。现在多引申为配置文件之意。默认情况下,vim编辑器里既不显示行号,也没有语法高亮度、智能缩进。为了方便使用,基本的vim配置选项一般都会包括:显示行号。

tian830937的专栏 8173
上一篇: 多线程的同步 critical section 类的用法与解析
下一篇: asp.net怎么获取服务器基本信息
love__coder
博客等级 码龄18年 180粉丝 248原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值