{"id":13594748,"url":"https://github.com/Abstract-IDE/abstract-autocmds","last_synced_at":"2025-04-09T10:31:53.626Z","repository":{"id":219584943,"uuid":"749386866","full_name":"Abstract-IDE/abstract-autocmds","owner":"Abstract-IDE","description":"Useful autocmds for Neovim.","archived":false,"fork":false,"pushed_at":"2024-08-12T15:28:03.000Z","size":10,"stargazers_count":38,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T05:41:58.248Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Abstract-IDE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-28T12:46:12.000Z","updated_at":"2025-02-01T13:47:12.000Z","dependencies_parsed_at":"2024-02-02T10:30:45.719Z","dependency_job_id":"645d0a65-0779-4db7-b150-66c48ac3e509","html_url":"https://github.com/Abstract-IDE/abstract-autocmds","commit_stats":null,"previous_names":["abstract-ide/abstract-autocmds"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abstract-IDE%2Fabstract-autocmds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abstract-IDE%2Fabstract-autocmds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abstract-IDE%2Fabstract-autocmds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abstract-IDE%2Fabstract-autocmds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Abstract-IDE","download_url":"https://codeload.github.com/Abstract-IDE/abstract-autocmds/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248020591,"owners_count":21034459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T16:01:38.715Z","updated_at":"2025-04-09T10:31:53.270Z","avatar_url":"https://github.com/Abstract-IDE.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"Useful autocmds for Neovim.\n\n# Installation and Uses.\n\n### using lazy.nvim\n\nAll commands are disabled by default.\n\n```lua\n\n{\n\t\"Abstract-IDE/abstract-autocmds\",\n\tlazy = false,\n\tconfig = function()\n\t\trequire(\"abstract-autocmds\").setup({\n\t\t\tauto_resize_splited_window = true,\n\t\t\tremove_whitespace_on_save = true,\n\t\t\tno_autocomment_newline = true,\n\t\t\tclear_last_used_search = true,\n\t\t\topen_file_last_position = true,\n\t\t\thighlight_on_yank = {\n\t\t\t\tenable = true,\n\t\t\t\topts = {\n\t\t\t\t\ttimeout = 150,\n\t\t\t\t},\n\t\t\t},\n\t\t\tgive_border = {\n\t\t\t\tenable = true,\n\t\t\t\topts = {\n\t\t\t\t\tpattern = { \"null-ls-info\", \"lspinfo\" },\n\t\t\t\t},\n\t\t\t},\n\t\t\tsmart_dd = true,\n\t\t\tvisually_codeblock_shift = true,\n\t\t\tmove_selected_upndown = true,\n\t\t\tgo_back_normal_in_terminal = true,\n\t\t\tctrl_backspace_delete = {\n\t\t\t\tenable = true,\n\t\t\t\topts = {\n\t\t\t\t\tinsert_mode = true,\n\t\t\t\t\tcmd_mode = false,\n\t\t\t\t},\n\t\t\t},\n\t\t\tsmart_visual_paste = true,\n\t\t\tdont_suspend_with_cz = true,\n\t\t\tsmart_save_in_insert_mode = true,\n\t\t\tscroll_from_center = true,\n\t\t\tsearch_within_visual = true,\n\t\t})\n\tend,\n}\n```\n\n# Available autocmds\n\nAutomatically resizes split windows in tabs to maintain equal sizes when the Vim window is resized.\n\n```lua\nauto_resize_splited_window = true\n```\n\nRemoves trailing whitespace from each line when saving a buffer\n\n```lua\nremove_whitespace_on_save = true\n```\n\nPrevents Neovim from automatically adding comments to new lines when entering a buffer or changing its file type.\n\n```lua\nno_autocomment_newline = true\n```\n\nClears the last used search pattern when entering a buffer window\n\n```lua\nclear_last_used_search = true\n```\n\nJumps to the last cursor position when reopening a file\n\n```lua\nopen_file_last_position = true\n```\n\nHighlights text when yanked in Neovim, using the specified timeout and applying the highlighting to the \"Search\" highlight group.\n\n```lua\nhighlight_on_yank = {\n    enable = true,\n    opts = {\n        timeout = 150,\n    },\n}\n```\n\nEnables border decoration for specific patterns\n\n```lua\ngive_border = {\n    enable = true,\n    opts = {\n        pattern = { \"null-ls-info\", \"lspinfo\" },\n    },\n}\n```\n\nsmart deletion functionality for the \"dd\" command. If the current line is empty, it deletes the line without affecting the yank register. Otherwise, it behaves like the standard \"dd\" command.\n\n```lua\nsmart_dd = true\n```\n\nFacilitates the movement of code blocks by allowing users to enter visual mode (v), select several lines of code, and then press \"\u003e\" or \"\u003c\" several times to shift the selected block of code.\n\n```lua\nvisually_codeblock_shift = true\n```\n\nEnables moving the selected line(s) up or down in visual mode. Pressing \"J\" moves the selected lines down, while \"K\" moves them up.\n\n```lua\nmove_selected_upndown = true\n```\n\nProvides a way to return to normal mode within Neovim's terminal, ensuring compatibility with plugins like floaterm. It maps the Escape key in terminal mode to the key sequence \u003cc-\\\u003e\u003cc-n\u003e, which switches back to normal mode.\n\n```lua\ngo_back_normal_in_terminal = true\n```\n\nEnables deleting a word backward in insert or/and command mode using Ctrl+Backspace.\n\n```lua\nctrl_backspace_delete = {\n\tenable = true,\n\topts = {\n\t\tinsert_mode = true,\n\t\tcmd_mode = false,\n\t},\n},\n```\n\nPaste in visual mode without overwriting the yank register\nDEFAULT BEHAVIPR: in visual mode ('x'), pressing 'p' replaces the selected text with the content of the default register, effectively pasting the last deleted or yanked text.\n\n```lua\nsmart_visual_paste = true\n```\n\nPrevents Neovim from suspending with Ctrl+Z when entering a buffer, ensuring that it doesn't suspend the terminal.\n\n```lua\ndont_suspend_with_cz = true\n```\n\nEnables saving the buffer when it has been modified, triggered by pressing Ctrl+S in insert mode or normal mode.\n\n```lua\nsmart_save_in_insert_mode = true\n```\n\nEnhances scrolling behavior in normal mode, allowing scrolling up/down from the center of the screen.\n\n```lua\nscroll_from_center = true\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAbstract-IDE%2Fabstract-autocmds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAbstract-IDE%2Fabstract-autocmds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAbstract-IDE%2Fabstract-autocmds/lists"}