Skip to content

Commit

Permalink
fix: easier replace
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts committed Dec 29, 2022
1 parent 6ac7c6f commit 0d686ea
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 27 deletions.
26 changes: 9 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,36 +52,28 @@ git clone git@github.com:shortcuts/neovim-plugin-boilerplate.git ~/my-awesome-pl
#### File names

```sh
mv plugin/YOUR_PLUGIN_NAME.lua plugin/my-awesome-plugin.lua
mv plugin/your-plugin-name.lua plugin/my-awesome-plugin.lua
mv lua/your-plugin-name lua/my-awesome-plugin
mv README_TEMPLATE.md README.md

```

#### References
#### Search and replace placeholder occurrences:

##### Go to the plugin directory and open Neovim:

```sh
cd ~/my-awesome-plugin.nvim && nvim .
```

##### Search and replace placeholder occurrences:

> For Lua and README.md files
> Below actions are Neovim commands
```vim
:vimgrep /YourPluginName/ **/*
:cfdo %s/YourPluginName/MyAwesomePlugin/g | update
:vimgrep /your-plugin-name/ **/*
:vimgrep /your-plugin-name/ **/* .github/**
:cfdo %s/your-plugin-name/my-awesome-plugin/g | update
```
> For GitHub action files
:vimgrep /YOUR_GITHUB_NAME/ .chglog/** .github/**
:cfdo %s/YOUR_GITHUB_NAME/shortcuts/g | update
```vim
:vimgrep /your-plugin-name/ .github/**
:cfdo %s/your-plugin-name/my-awesome-plugin/g | update
:vimgrep /YOUR_REPOSITORY_NAME/ .chglog/** **/*.md
:cfdo %s/YOUR_REPOSITORY_NAME/my-awesome-plugin.nvim/g | update
```

### 3 - Code
Expand Down
20 changes: 10 additions & 10 deletions README_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<h1 align="center">YOUR_PLUGIN_NAME</h2>
<h1 align="center">your-plugin-name</h2>
</p>

<p align="center">
Expand Down Expand Up @@ -47,9 +47,9 @@ _[GIF version of the showcase video for mobile users](SHOWCASE_GIF_LINK)_

```lua
-- stable version
use {"YOUR_PLUGIN_NAME", tag = "*" }
use {"your-plugin-name", tag = "*" }
-- dev version
use {"YOUR_PLUGIN_NAME"}
use {"your-plugin-name"}
```

</td>
Expand All @@ -64,9 +64,9 @@ use {"YOUR_PLUGIN_NAME"}

```lua
-- stable version
Plug "YOUR_PLUGIN_NAME", { "tag": "*" }
Plug "your-plugin-name", { "tag": "*" }
-- dev version
Plug "YOUR_PLUGIN_NAME"
Plug "your-plugin-name"
```

</td>
Expand All @@ -81,9 +81,9 @@ Plug "YOUR_PLUGIN_NAME"

```lua
-- stable version
require("lazy").setup({{"YOUR_PLUGIN_NAME", version = "*"}})
require("lazy").setup({{"your-plugin-name", version = "*"}})
-- dev version
require("lazy").setup({"YOUR_PLUGIN_NAME"})
require("lazy").setup({"your-plugin-name"})
```

</td>
Expand All @@ -103,11 +103,11 @@ require("lazy").setup({"YOUR_PLUGIN_NAME"})
<details>
<summary>Click to unfold the full list of options with their default values</summary>

> **Note**: The options are also available in Neovim by calling `:h YOUR_PLUGIN_NAME.options`
> **Note**: The options are also available in Neovim by calling `:h your-plugin-name.options`
```lua
require("YOUR_PLUGIN_NAME").setup({
-- you can copy the full list from lua/YOUR_PLUGIN_NAME/config.lua
require("your-plugin-name").setup({
-- you can copy the full list from lua/your-plugin-name/config.lua
})
```

Expand Down
File renamed without changes.

0 comments on commit 0d686ea

Please sign in to comment.