fedora24安装后,配置环境
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了fedora24安装后,配置环境相关的知识,希望对你有一定的参考价值。
1.设置终端打开的快捷方式
右键->settings->keyboard->Custom Shortcuts->...
2.添加fedora中文社区源
wget wget http://repo.fdzh.org/FZUG/FZUG.repo -P /etc/yum.repos.d/
3.禁止输入时鼠标光标闪烁
gsettings set org.gnome.desktop.interface cursor-blink false
4.配置vim
安装一些插件:ctrp delimiMate tagbar vim-pathogen vim-surround YouCompleteMe
编译YCM
1)mkdir ~/ycm_build&&cd ~/ycm_build
2)安装vim(>7.4版本,也要支持python),cmake,clang(会用到里面的libclang.so,版本>=3.8)
cmake -G "Unix Makefiles" ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp
-DEXTERNAL_LIBCLANG_PATH=/usr/lib64/libclang.so.3.8
此时,在 /home/lw/.vim/bundle/YouCompleteMe/third_party/ycmd里面有两个.so文件
即libclang.so.3.8和ycm_core.so,编译就完了.
3)cp .vim/bundle/YouCompleteMe/third_party/ycmd/examples/.ycm_extra_conf.py ~/
根据自己情况修改里面的配置就行了.
5.修改/etc/bashrc
export EDITOR=/usr/bin/vim
export network=/etc/sysconfig/network-scripts
alias vi=‘vim‘
vim配置文件
set nu
set t_Co=256 "在字符界面下要去掉
set tw=79
set noswapfile
set hlsearch "表示高亮搜索单词
set incsearch "表示边输入便匹配
"大小写忽略
set ignorecase
set smartcase
"shift+insert可以把系统剪切版的内容拷贝高vim
"set expandtab "输入tab时自动转换为空格
set encoding=utf-8
set fileformat=unix
let mapleader=";"
nnoremap <leader>" viw<esc>a"<esc>hbi"<esc>lel
nnoremap <leader>‘ viw<esc>a‘<esc>hbi‘<esc>lel
nnoremap <leader>( viw<esc>a)<esc>hbi(<esc>lel nnoremap - _
set nowrap "设置不自动折行
set title
inoremap jk <esc>
set wildmenu "自身命令模式下补全
set laststatus=2
set cursorline
set tabstop=4
set shiftwidth=4 "自动缩进插入的空格数
set softtabstop=4 "使用或自动插入或删除相应的空格数
set smartindent
nnoremap <C-h> <C-w>h
nnoremap <C-l> <C-w>l
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <leader>w :wq<enter>
vnoremap <leader>w :wq<enter>
nnoremap <leader>q :q!<enter>
nnoremap - _
set nocompatible "打开不兼容模式
syntax on
filetype indent on "根据文件类型进行自动缩进
filetype on "开启文件类型侦测 filetype plugin on "根据侦测到的不同类型加载对应的插件
runtime bundle/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect()
"数字
hi Number ctermfg=red
"所有项的颜色
hi Pemnu ctermfg=white ctermbg=black
"选中项的颜色
hi PmenuSel ctermfg=black ctermbg=lightblue
"-------delimate.vim 0----
"选择补全的括号
let delimiMate_autoclose = 1
let delimiMate_matchpairs = "(:),[:],{:}"
"按enter键
let delimitMate_expand_cr = 1
"let delimitMate_expand_space = 1
let delimitMate_quotes = "\" ‘ `"
"ctrlP.vim 2-------------
set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
let g:ctrlp_custom_ignore = ‘\v[\/]\.(git|hg|svn)$‘
let g:ctrlp_custom_ignore = {
\ ‘dir‘: ‘\v[\/]\.(git|hg|svn)$‘,
\ ‘file‘: ‘\v\.(exe|so|dll)$‘,
\ ‘link‘: ‘some_bad_symbolic_links‘,
\ }
"nerdcommenter 3----------
"在注释// 后面添加一个空格
let g:NERDSpaceDelims = 1
"将行注释符左对齐
let g:NERDDefaultAlign = ‘left‘
"修正注释后面尾随的空格
let g:NERDTrimTrailingWhitespace = 1
"visual模式下<leader>ci能选择复制
"indentLine.vim 4----------
let g:indentLine_char=‘┆‘
let g:indentLine_enabled = 1
"指定线条的颜色
let g:indentLine_color_term = "green"
"YCM 5-----------
"python解释器路径
"let g:ycm_python_binary_path = ‘usr/bin/python3.5‘
"是否开启语义补全
let g:ycm_seed_identifiers_with_syntax=1
"是否注释中也开启补全
let g:ycm_comlete_in_comments=1
let g:ycm_collect_indentifiers_from_comments_and_strings=0
"开启补全字符数
let g:ycm_min_num_of_chars_for_completion=1
"补全后,当切换到normal模式时,关闭窗口
let g:ycm_autoclose_preview_window_after_insertion=1
"字符串中也开启补全
let g:ycm_complete_in_strings =1
"
"跳转到定义处
"nnoremap <leader>g :YcmCompleter GoToDefinition<CR>
"跳转到文档处
"nnoremap <leader>g :YcmCompleter GoToDeclaration<CR>
nnoremap <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
"关闭加载.ycm_extra_conf.py的提示
let g:ycm_confirm_extra_conf=0
"printf,这样的include包含的汉书补全补全
let g:ycm_key_invoke_completion = ‘<C-a>‘
let g:ycm_global_ycm_extra_conf=‘~/.ycm_extra_conf.py‘
本文出自 “12208412” 博客,请务必保留此出处http://12218412.blog.51cto.com/12208412/1871988
以上是关于fedora24安装后,配置环境的主要内容,如果未能解决你的问题,请参考以下文章
Fedora 24 Linux 环境下实现 Infinality 字体渲染增强及 Java 字体渲染改善的方法
03 刚安装了Fedora,进去就是Gnome环境的,想切换到KDE,怎么弄