summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Try to change some cursor set, failedHEADmasterWe-unite2025-03-131-2/+11
| | | | | | | | | | | | First of all, although it's useful to highlight cursorline and cursor column, it's hard toi decide their background color, to make them red always conflicts with highlight of code, which would hide all the chars. But, emmm....So let's try default color(light gray) now. Besides, color of the char under cursor is always changed, white to be black, etc. It's not because of vim configurations, but the trick of terminal, because in remote ssh it's different. The problem hasn't been found, left to future.
* Tab removed from vimscript/sh/makefile, etc.We-unite2025-01-246-245/+244
|
* Fix bugs in clang-format and tab configureWe-unite2025-01-041-5/+7
| | | | | | | | | | | clang-format maybe not exist on some environment, so it's necessary to use default gg=G format. Besides, clang-format should use currect style file to work but not just `clang-format` command by default, because it will use .clang-format from the curreent dir but not the dir the file is in. And, maybe some other config affect tab set, tab is expanded in shell/make/vimscript, which is not my mean. Now it's fixed.
* Fix some important bugsWe-unite2024-12-245-75/+52
| | | | | | | | | - For all files, `gg=G`is changed to make the cursor position fixed after the file gets formatted. - For files in git repo, the old way to show branch is totally wrong, because the space of `git branch` is deleted. - Show EOL and wrap char in vim - Other things
* Update plugins and code setWe-unite2024-12-218-155/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | About `YouCompleteMe` -------------------- YCM uses two ways to check or complete codes. It first check if clangd exists in your environment, which is a backend of code database. If so, check and completion base on samentics would be used by default, otherwise it would show us symbol based matching, using itself, ctags, global tags, or other tools. The 'go to define/declaration/referance` command has been offered bu hard to use. With clangd joined, it's very helpful now. If you want to jump back, just Ctrl-o. YCM adds the old position to list, so ctrl-o leads you back. What a stack! About clangd -------------------- clangd is a server offered by clang/llvm. If the project has a compile database, it then works. The compile database can be generated by cmake or makefile. In cmake, add this to CMakeLists.txt: ```cmake set(CMAKE_EXPORT_COMPILE_COMMANDS ON) ``` Or in make, you should `bear -- make <args>` instead of `make <args>`. Both the two ways generate a `compile_commands.json` in project root dir (or <root>/build, as you know).Clangd reads the file. Other new plugins -------------------- vim-indent-guides add indent line to vim, making code reading and writing more easy. nerdcommenter helps to create or cancel comment in many kinds of src. vim-surround can add/delete/change symbol surrounding sth. My Own Set -------------------- Code format is gg=G, for c/cpp, it's clang-format. In the old config, it's a fixed style. Now it reads .clang-format under current path and ancient paths. If .clang-format exists, use it, otherwise use fixed style. It's helpful while reading/writing src codes, such as the Linux kernel. In the status line of old config, the branch name is showed if the current file is under a git repo and on a branch of git. That's not enough. Now it checks if the file is under git repo: ```plaintext if(not in repo) { return ""; } if(on branch) { return branch name; } else if(is a tag) { return tag name; }else { return commit id; } ``` Some other config are also updated. End -------------------- Moving for the better!
* Original commit.We-unite2024-12-207-0/+416
vimrc the system vimrc, used to import other config files vimrcs real config files vimrcs/codecmd.vim: set sth about code, such as formatter, head of file, etc. vimrcs/keybind.vim keyboard shortcut vimrcs/match.vim bracket matching vimrcs/myset.vim color scheme and other showoff vimrcs/plugs.vim vim plugin and relative set vimrcs/statusline.vim style of status line