1. Linux 下编译c++
vim test.cpp    // 创建文件
g++ test.cpp    // 编译文件
./a.out         // 执行文件
g++ test.cpp -o new_file.out   编译C++文件,生成new_file.out文件 ( -o 字母 o)


2 . 设置 vim 
vi ~/.vimrc


set nobackup
set nu
syntax on 

set showcmd 
set showmatch 
set ignorecase 
set smartcase 
set incsearch 
set autowrite 
set hidden 

set tabstop=8 
set softtabstop=4 
set shiftwidth=4 
set expandtab 
set autoindent 
set cindent


Esc ->  shift + q  ->    wq  

设置完后保存退出。

执行 source ~/.vimrc 使配置生效


VIM升级到最新版, sudo apt-get install vim



相关文章:

  • 2021-07-03
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
  • 2022-02-24
  • 2021-09-07
  • 2021-09-14
猜你喜欢
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2021-08-11
  • 2021-09-10
  • 2022-12-23
  • 2021-11-26
相关资源
相似解决方案