• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

CodeHeaven: Coding enviroment. Some setting for ZSH, VIM, C/C++ .

原作者: [db:作者] 来自: 网络 收藏 邀请

My coding tools and configuration.asciicast

1. ZSH

change color schemes Right clik on terminal, enter profile Preference, choose Colors -> Solarized dard

sudo apt-get install zshsudo apt-get install powerline  #install necessary font# use ohmyzshunzip ohmyzsh-master.zipcd ohyzshg-master/tools && sh isntall.sh# use agnoster.zsh-themecp zsh/agnoster.zsh-theme ~/.oh-my-zsh/themes/agnoster.zsh-theme# if you using Conda, following config is needconda config --set auto_activate_base falseconda config --set auto_activate_base trueconda config --set changeps1 False	# avoid duplicate name of env# install zsh syntax highlightinggit clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

1.1. VSCode

enter preferrence->setting->terminal fonts, set 'Ubuntu Mono', 'PowerlineSymbols'

1.2. Plugins for VSCode

Bash DebugBracker Pair Colorizer

C/C++C++ IntellisenseNative Debugclangd

Python

Shell-formatshellman

VIM

CmakeCmake Toolscmake-format

Git GraphGit historyGitLens

Perl (publisher:"Gerald Richter", run: sudo cpan Perl::LanguageServer, sudo cpan install Moose,sudo cpan PadWalker,sudo apt-get install libpadwalker-perl)

2. VIM

2.1. REQUIREMENTS

git clone https://gitee.com/shipleyxie/CodeHeaven.gitcd CodeHeaven# compile and install vim8.2# if you  have installed vim beforesudo apt-get remove \		vim \		vim-runtime \		gvim \		vim-tiny \		vim-common \		vim-gui-common# install needed libsudo apt-get install \		libncurses5-dev \		libgnome2-dev \		libgnomeui-dev \		libgtk2.0-dev \		libatk1.0-dev \		libbonoboui2-dev \		libcairo2-dev \		libx11-dev \		libxpm-dev \		libxt-dev \		python-dev python3-dev ruby-dev \		mercurial# use latest gitsudo add-apt-repository ppa:git-core/ppasudo apt updatesudo apt install -fsudo apt upgrade# compile Python3.6 to use YouCompleteMewget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgz./configure --enable-sharedmake make installsudo cp /usr/local/lib/libpython3.6m.so.1.0 /usr/lib# install needed lib for YouCompleteMesudo apt-get install mono-completesudo apt-get install npm# source compile VIMunzip vim8.2-source.zipcd vim-master# configure with huge feature and enable python./configure --with-features=huge \		--enable-multibyte \		--enable-rubyinterp \		--enable-python3interp=yes \		--with-python3-config-dir=$(python3.6-config --configdir) \		--enable-perlinterp \		--enable-luainterp \		--enable-gui=gtk2 \		--enable-cscope \		--prefix=/usr/local# make sure you are at vim-master, then runmake -j 8 && sudo make install# plugins used for auto format in VIMsudo apt-get install     python-autopep8 \    astyle \    clang-format \    ack-greppip install yapfpip install --user blackpip install yapfsudo apt-get install python-pip# github.com/wklken/k-vim   <-  C_vim plugin refcp -rf vimrc ~/.vim_runtimesh ~/.vim_runtime/install_awesome_vimrc.sh# install YouCompleteMecd my_plugins/youcompletmegit submodule update --init --recursivepython3.6 install.py --clangd-completer		# enable C++python3.6 install.py --all			# enable all# when it come to "tarfile.ReadError: file could not be opened successfully"# change to python2 and do tarfile.extractall manually# NOTE 1: pip install compiledb	# used for make# compiledb make # NOTE 2: # If using CMake, add -DCMAKE_EXPORT_COMPILE_COMMANDS=ON # when configuring (or add set( CMAKE_EXPORT_COMPILE_COMMANDS ON ) to CMakeLists.txt) # and copy or symlink the generated database to the root of your project.# color_codedsudo apt-get install build-essential libclang-3.9-dev libncurses-dev libz-dev cmake xz-utils libpthread-workqueue-devcd color_codedmkdir build && cd build && cmake ..make && make install

sudo apt install jq # Command-line JSON processorthen you can format json file by using :%!jq . in vim.

2.2. termdebug

Use this command :packdd termdebug to load termdebug which is very useful when debugging C.

2.3. INSTALL PULUGIN

cd ~/.vim_runtimegit clone git://github.com/tpope/vim-rails.git my_plugins/vim-rails

2.4. KEY MAPPINGS

The <leader> represent ,

2.5. PLUGIN

Clone plugin file into ~/.vim_runtime/my_plugins, reopen VIM it will be installed automatically by pathogen

cd ~/.vim_runtimegit clone git://github.com/tpope/vim-rails.git my_plugins/vim-rails/git clone git://github.com/majutsushi/tagbar my_plugins/tagbar/

If you want to upgrade plugins, please following the instruction as below

# update pluginscd ~/.vim_runtime#git pull --rebasepython update_plugins.py

my .vimrc with mapping of vim-header

 set runtimepath+=~/.vim_runtime  source ~/.vim_runtime/vimrcs/basic.vim source ~/.vim_runtime/vimrcs/filetypes.vim source ~/.vim_runtime/vimrcs/plugins_config.vim source ~/.vim_runtime/vimrcs/extended.vim  try source ~/.vim_runtime/my_configs.vim catch endtry  let g:header_field_author = 'Your Name' let g:header_field_author_email = 'your@mail' map <F4> :AddHeader<CR>

3. TMUX

3.1. tmux

ctrl B ctrl f : find another sessionctrl B f : find another window

4. GIT

4.1. commitizen

Automatically generate commit messages.

sudo npm install -g npmsudo npm install -g commitizennpm install commitizen -g# initialize your project use:commitizen init cz-conventional-changelog --save-dev --save-exact# then you can usegit cz

5. Doxygen

sudo apt-get install flexsudo apt-get install bisonsudo apt-get install graphvizcd doxygenmkdir build && cd buildcmake -G "Unix Makefiles" ..makesudo make install

6. xournal

Xournal is a notetaking software

sudo apt-get install xournal

Upgrade gcc/g++

sudo add-apt-repository ppa:ubuntu-toolchain-r/testsudo apt-get updatesudo apt install gcc-10For g++-10:sudo apt install g++-10

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap