init commit
This commit is contained in:
commit
fd509a515b
8 changed files with 419 additions and 0 deletions
37
lua/base/other.lua
Normal file
37
lua/base/other.lua
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
local opt = vim.opt
|
||||
local g = vim.g
|
||||
|
||||
-- [[ Set panels ]] --
|
||||
-- Vertical splits set right-side
|
||||
-- By defalut, the panels in Neovim are placed according to the location of the current panel.
|
||||
-- This setting will help us to keep the panels in order.
|
||||
opt.splitright = true
|
||||
|
||||
-- Horizontal splits become below
|
||||
opt.splitbelow = true
|
||||
|
||||
-- Use the system clipboard
|
||||
opt.clipboard = "unnamedplus"
|
||||
|
||||
-- Disable file addtion at the end
|
||||
opt.fixeol = false
|
||||
|
||||
-- Autocomplite (buil-in Neovim)
|
||||
opt.completeopt = "menuone,noselect"
|
||||
|
||||
-- Not autocomment new lines when moving to a new line
|
||||
|
||||
vim.cmd [[autocmd BufEnter * set fo-=c fo-=r fo-=o]]
|
||||
|
||||
-- Set encoding file and show terminal to UTF-8
|
||||
|
||||
opt.encoding = "utf-8"
|
||||
opt.fileencoding = "utf-8"
|
||||
opt.ff = "unix"
|
||||
|
||||
-- Also work under ru
|
||||
opt.langmap = "ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz"
|
||||
|
||||
opt.colorcolumn = "120"
|
||||
|
||||
opt.mouse = ""
|
||||
25
lua/base/search.lua
Normal file
25
lua/base/search.lua
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
-- Set value for vim.opt and vim.g
|
||||
local opt = vim.opt
|
||||
local g = vim.g
|
||||
|
||||
|
||||
-- [[ Serach ]] --
|
||||
-- Ignore case when searching
|
||||
-- if we now type in "IGNORE", it will also find "ignore"
|
||||
opt.ignorecase = true
|
||||
|
||||
-- Don't ignore case searching if there are characters in upper case
|
||||
-- If we now type "Ignore", it will only search for "Ignore"
|
||||
opt.smartcase = true
|
||||
|
||||
-- highlight found text
|
||||
opt.showmatch = true
|
||||
opt.incsearch = true
|
||||
opt.hlsearch = true
|
||||
|
||||
-- Show line numbers relatively
|
||||
opt.number = true
|
||||
opt.relativenumber = true
|
||||
|
||||
-- Replace all by-default
|
||||
opt.gdefault = true
|
||||
24
lua/base/tabs.lua
Normal file
24
lua/base/tabs.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
local opt = vim.opt
|
||||
local g = vim.g
|
||||
|
||||
-- [[ set tabs ]] --
|
||||
-- Set the numbers of whitespace characters when shifting with "<" or ">".
|
||||
-- In fact, in spite of expandtab, the terminal still displays whitespace charaters,
|
||||
-- so let's set the number of whitespace characters for ones press of these buttons.
|
||||
opt.shiftwidth = 2
|
||||
|
||||
-- one tab == two whitespace characters in new line.
|
||||
-- Pressing <CR> will insert tabs. Tabs are drawn as whitespace.
|
||||
-- that's why we have to set that each tab on a new line is two whitespace.
|
||||
opt.tabstop = 2
|
||||
|
||||
-- Adjust new line to the previous indentation
|
||||
opt.smartindent = true
|
||||
|
||||
opt.expandtab = false
|
||||
opt.smarttab = true
|
||||
opt.scrolloff = 8
|
||||
|
||||
-- Show unprintable
|
||||
opt.list = true
|
||||
opt.listchars = {tab = '⁞ ', eol = '¬', trail = '·'}
|
||||
Loading…
Add table
Add a link
Reference in a new issue