Seperate JSX and function blocks from parent parentheses or parent tag
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
let say I have a React Component (class based for now, yeah i should start using hooks =D)
class App extends Component {
state = {
someState: ""
}
render() {
return (
<View>
<View>
<Text>Header</Text>
</View>
<View>
<Text>Main</Text>
</View>
<View styles={styles.footer}>
<Text>Footer</Text>
</View>
</View>
)
}
}
Now i am using vimvscode so i use shift + [ or shift + ] a lot;
now let say i need to delete
state = {
someState: ""
}
for me i think best way to delete that part i d + shift + [
if my cursor is at
state = {
someState: ""
}[Cursor]
but it will delete up to class App extends Component
same goes for JSX
if i want to delete footer only
<View styles={styles.footer}>
<Text>Footer<Text>
</View>
with d + shift + ] if my cursor is at:
it will delete all upto:
<View styles={styles.footer}>
<Text>Footer</Text>
</View>
</View>
)
}
}
I don't want this behaviour,
so i would love to know any prettier configuration or vim plugin that can help me do these stuff
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by examining how VSCodeVim handles bracket motions for JavaScript and JSX, then determine whether configuration or plugin support can provide the requested boundaries; done means deletion stops at the intended function or JSX block rather than the surrounding parent structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, typescript, vim, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100