Skip to content

snghojeong/envvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

First, install vim-plug ( https://github.com/junegunn/vim-plug )

sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
   https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

And then, install init.vim(nvim):

git clone https://github.com/snghojeong/envvim.git
cp init.vim ~/.config/nvim/init.vim

And when you using cmake to build makefile, give -DCMAKE_EXPORT_COMPILE_COMMANDS=ON option to make compile_commands.json.

Prerequisites for CoC:

Install node.js
Install yarn
Install clangd (Mac: brew install llvm)
Run command ':CocInstall coc-tsserver coc-json coc-clangd coc-rust-analyzer'
Use 'compile_commands.json'

My favorites 1. Intellisense

My vim plugin environment uses CoC for intellisense. To use this function, you should get "compile_commands.json" file acquired by CMake. By adding "-DCMAKE_EXPORT_COMPILE_COMMAND=ON", you can achive it! and enjoy intellisense presented by CoC. Notice! You should place your "compile_commands.json" file generated by CMake to home directory where you start vim.

My favorites 2. Visual Mode

Have you ever use mause drag on your text editor? Perhaps, you use mause drag to block some of text contents to copy, cut or modify the text. In Vim, you can block your contents like GUI based word process do! Simply, just press 'v' and now you vim turn into visual mode. I favorite Shift+'v' to block lines. This is very powerful! After you block your text, you can modify your contents by followings: U: turn into upper case. u: turn into lower case. x: cut the contents.

My favorites 3. FZF (Find file...)

Almost of IDE support "Find file" function that open source file that you need. My vim environment also provides the find tool using interesting plugin named "FZF". If you want to find some file, just press '\ff' and you can show the list of files. Type the file name that you need and then plugin will shows candidates. The most fascinating feature is that the plugin utilize fuzzy algorithm to search file name. By doing so, you can pick the file even if you have some mistake on file name typed.

My favorites 4. Surround

All the time I code some software, I must use some kind of surrounding syntax. ex) "", '', (), {} and so on. If I already type contents and I need to surround them, in vim it is quite annoying job. Type " and move to end, and type" again... In this case, I just use Surround plugin! You just block the content that you want to surround, and then type 'S+"', after typing you can show that your content already surrounded by ".

My favorites 5. NERDTree

All IDE have their file browser to search file and to understand directory structure easily. In my vim plugin, I have the plugin that provides saem function as IDE file browser. The name of the plugin is NERDTree. I configure F9 as shorcut of NERDTree, so you can use it just by typing F9. Try!

My favorites 6. Go to the definition or the declaration of a symbol

I use ctags + cscope to move my cursor on the definition or the declaration of symbol. Especially I made my shortcut for this command. Try "Ctrl + \ + c" to search the location that the function is called. Try "Ctrl + \ + s" to search all the location of the symbol. Try "Ctrl + ]" to move the definition of the symbol. Try "Ctrl + t" to move the previous tag location.

License

Distributed under the same terms as Vim and NeoVIM itself. See :help license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published