25 lines
1.1 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 編輯器行為設定
vim.api.nvim_set_option("clipboard", "unnamedplus") -- 使用系統剪貼簿Wayland有直接支援不須依賴vim-wayland-clipboard
vim.opt.confirm = true -- 操作過程有衝突時,以明確的文字來詢問
vim.opt.history = 10000 -- 設定命令歷史記錄數量為 10000
-- vim.opt.directory = "." -- 將暫存檔存放在當前資料夾中
require("config.swap") -- 將暫存檔存放置位置另外做邏輯
vim.opt.mouse = "a" -- 啟用滑鼠支援
-- 編碼設定
vim.opt.encoding = "utf-8"
vim.opt.fileencodings = { "utf-8", "cp950" }
vim.opt.enc = "utf-8"
-- 設定編輯選項
vim.opt.number = true -- 顯示行號
vim.opt.relativenumber = false -- 相對行號
vim.opt.tabstop = 4 -- tab鍵寬度
vim.opt.shiftwidth = 4 -- 自動縮排寬度
vim.opt.expandtab = true -- 使用空格代替tab
vim.opt.termguicolors = true -- 支持真彩色
vim.opt.colorcolumn = "80,120" -- 顯示編輯器建議寬度
vim.opt.scrolloff = 3 -- 捲動時保留 n 行彈性
require("config.listchars") -- 顯示行尾符號
vim.opt.list = true